summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-01-04 22:32:31 +0100
committerLennart Poettering <lennart@poettering.net>2013-01-04 23:26:21 +0100
commit77e68fa2f0bd018bab2621a31919bfaa6a6b0a35 (patch)
treef58c09e7e82c2be782ee7f172d6e0306cd90cc46 /configure.ac
parent32f992a514949b42550b97cadb3bb5499b54ca49 (diff)
systemctl: enable chkconfig compat only if chkconfig is found rather than based on distro
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 92dbdf5a30..a39dd6a33c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -233,6 +233,25 @@ if test "x${have_ima}" != xno ; then
fi
# ------------------------------------------------------------------------------
+have_chkconfig=yes
+AC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]),
+ [case "${enableval}" in
+ yes) have_chkconfig=yes ;;
+ no) have_chkconfig=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;;
+ esac],
+ [AC_PATH_PROG(CHKCONFIG, chkconfig)
+ if test -z "$CHKCONFIG"; then
+ have_chkconfig=no
+ else
+ have_chkconfig=yes
+ fi])
+
+if test "x${have_chkconfig}" != xno ; then
+ AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available])
+fi
+
+# ------------------------------------------------------------------------------
have_selinux=no
AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
if test "x$enable_selinux" != "xno"; then
@@ -873,6 +892,7 @@ AC_MSG_RESULT([
GCRYPT: ${have_gcrypt}
QRENCODE: ${have_qrencode}
MICROHTTPD: ${have_microhttpd}
+ CHKCONFIG: ${have_chkconfig}
binfmt: ${have_binfmt}
vconsole: ${have_vconsole}
readahead: ${have_readahead}