build: add --enable-tests=root to enable tests that require uid=0

This commit is contained in:
Pavel Šimerda
2012-12-18 14:14:13 +01:00
parent 954ce65e99
commit a596db45f0

View File

@@ -638,7 +638,7 @@ dnl -------------------------
VAPIGEN_CHECK(0.17.1.24)
# Tests, utilities and documentation
AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests], [Build NetworkManager tests (default: yes)]))
AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests=root|yes|no], [Build NetworkManager tests (default: yes)]))
AC_ARG_ENABLE(doc, AS_HELP_STRING([--enable-doc], [Build NetworkManager documentation (default: no)]))
# Fallback to --with-tests and with-docs
AC_ARG_WITH(tests, AS_HELP_STRING([--with-tests], [Build NetworkManager tests (deprecated)]))
@@ -649,10 +649,11 @@ AS_IF([test -n "$with_docs"], enable_doc="$with_docs")
AS_IF([test -z "$enable_tests"], enable_tests="yes")
AS_IF([test -z "$enable_doc"], enable_doc="no")
# Normalize values
AS_IF([test "$enable_tests" != "yes"], enable_tests="no")
AS_IF([test "$enable_tests" != "yes" -a "$enable_tests" != "root"], enable_tests="no")
AS_IF([test "$enable_doc" != "yes"], enable_doc="no")
# Add conditionals
AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" = "yes")
AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" != "no")
AM_CONDITIONAL(RUN_ROOT_TESTS, test "$enable_tests" == "root")
AM_CONDITIONAL(ENABLE_DOC, test "$enable_doc" = "yes")
# Add gtk-doc conditionals
enable_gtk_doc="$enable_doc"