Update configure and Makefile to refer to a config path

Define a variable in configure having the information about config files

Change-Id: Ic68c02189a07d7198a4ea1ba858ec90aca9126ae
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/Makefile.am b/Makefile.am
index 9e49364..25e061a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,7 +11,7 @@
 CLEANFILES = led-gen.hpp
 
 led-gen.hpp: ${srcdir}/parse_led.py
-	$(PYTHON) $^ > $@
+	$(AM_V)@LEDGEN@ -d $YAML_PATH > $@
 
 phosphor_ledmanager_LDFLAGS = $(SYSTEMD_LIBS)
 phosphor_ledmanager_CFLAGS = $(SYSTEMD_CFLAGS)
diff --git a/configure.ac b/configure.ac
index d978030..cb7911e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,6 +57,11 @@
 AS_IF([test "x$OBJPATH" == "x"], [OBJPATH="/xyz/openbmc_project/ledmanager/groups"])
 AC_DEFINE_UNQUOTED([OBJPATH], ["$OBJPATH"], [The Ledmanager Dbus root])
 
+# Handling configuration files
+AC_ARG_VAR(YAML_PATH, [The path to the yaml config files.])
+AS_IF([test "x$YAML_PATH" == "x"], [YAML_PATH="$srcdir"])
+LEDGEN="$PYTHON $srcdir/parse_led.py -d $YAML_PATH"
+
 # Create configured output
 AC_CONFIG_FILES([Makefile test/Makefile])
 AC_OUTPUT