summaryrefslogtreecommitdiffstats
path: root/src/external/service.m4
blob: f475f26e332f757f5137b673127b0438ef44e6ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
AC_DEFUN([CHECK_SERVICE_EXECUTABLE],
    [ AC_PATH_PROG(SERVICE, service)
      AC_MSG_CHECKING(for the executable \"service\")
      if test -x "$SERVICE"; then
        AC_DEFINE(HAVE_SERVICE, 1, [Whether the service command is available])
        AC_DEFINE_UNQUOTED([SERVICE_PATH], ["$SERVICE"], [The path to service])
        AC_MSG_RESULT(yes)
      else
        AC_MSG_RESULT([no])
        AC_MSG_ERROR([the service executable is not available])
      fi
    ]
)