Read the slp service info.
Read the info from the services file which are in the
services dir.
Change-Id: If31b98af8eea55d75356d895afa42bf6c3cb6493
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/configure.ac b/configure.ac
index d20b4be..ae7b219 100755
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,6 @@
AC_INIT([slpd-lite], [1.0], [https://github.com/openbmc/slpd-lite/issues])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
-
# Checks for programs.
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX_14([noext])
@@ -18,5 +17,8 @@
AC_CHECK_HEADER(systemd/sd-bus.h, ,[AC_MSG_ERROR([Could not find systemd/sd-bus.h...systemd developement package required])])
# Checks for typedefs, structures, and compiler characteristics.
+AC_ARG_VAR(SERVICE_DIR, [Location of service files.])
+AS_IF([test "x$SERVICE_DIR" == "x"], [SERVICE_DIR="/etc/slp/services/"])
+AC_DEFINE_UNQUOTED([SERVICE_DIR], ["$SERVICE_DIR"], [Location of service files.])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT