diff options
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/conf_macros.m4 | 23 |
2 files changed, 24 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index baea45ca..65136e1c 100644 --- a/configure.ac +++ b/configure.ac @@ -94,6 +94,7 @@ WITH_SEMANAGE WITH_LIBNL WITH_NOLOGIN_SHELL WITH_APP_LIBS +WITH_SUDO m4_include([src/external/pkg.m4]) m4_include([src/external/libpopt.m4]) @@ -236,11 +237,6 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test x$DOXYGEN != xfalse ]) AM_CONDITIONAL([HAVE_CHECK], [test x$have_check != x]) -AM_CONDITIONAL([BUILD_SUDO], [test x$build_all_experimental_features != xno]) -if test x$build_all_experimental_features != xno; then - AC_DEFINE(BUILD_SUDO, 1, [whether to build with SUDO support]) -fi - abs_build_dir=`pwd` AC_DEFINE_UNQUOTED([ABS_BUILD_DIR], ["$abs_build_dir"], [Absolute path to the build directory]) AC_SUBST([abs_builddir], $abs_build_dir) diff --git a/src/conf_macros.m4 b/src/conf_macros.m4 index 537b9857..f3319444 100644 --- a/src/conf_macros.m4 +++ b/src/conf_macros.m4 @@ -401,3 +401,26 @@ AC_DEFUN([WITH_APP_LIBS], AC_SUBST(appmodpath) AC_DEFINE_UNQUOTED(APP_MODULES_PATH, "$config_appmodpath", [Path to the 3rd party modules]) ]) + +AC_DEFUN([WITH_SUDO], + [ AC_ARG_WITH([sudo], + [AC_HELP_STRING([--with-sudo], + [Whether to build with sudo support [no]] + ) + ], + [with_sudo=$withval], + [] + ) + + dnl Remove when sudo goes out of experimental + if test x"$enable_all_experimental_features" = xyes; then + if test x"$with_sudo" != xno; then + with_sudo=yes + fi + fi + + if test x"$with_sudo" = xyes; then + AC_DEFINE(BUILD_SUDO, 1, [whether to build with SUDO support]) + fi + AM_CONDITIONAL([BUILD_SUDO], [test x"$with_sudo" = xyes]) + ]) |