Fix swampd path

Fixed swampd path in service file as this file is a part of repo so
bindir was not converting to /usr/bin in build.

Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
Change-Id: Ia70ed2e023a16668b09175486816029f6b13b8bc
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/configure.ac b/configure.ac
index bfc6917..5075c67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -212,6 +212,17 @@
 AC_ARG_VAR(SYSTEMD_TARGET, "Target for starting this service")
 AS_IF([test "x$SYSTEMD_TARGET" == "x"], [SYSTEMD_TARGET="multi-user.target"])
 
+# Make a fully expanded variable for the service definition
+if test "x$prefix" = xNONE; then
+  prefix=$ac_default_prefix
+fi
+# Let make expand exec_prefix.
+if test "x$exec_prefix" = xNONE; then
+  exec_prefix='${prefix}'
+fi
+eval "eval BINDIR=$bindir"
+AC_SUBST([BINDIR])
+
 # Create configured output
 AC_CONFIG_FILES([Makefile test/Makefile])
 AC_CONFIG_FILES([phosphor-pid-control.service])
diff --git a/phosphor-pid-control.service.in b/phosphor-pid-control.service.in
index d0244fe..a030be1 100644
--- a/phosphor-pid-control.service.in
+++ b/phosphor-pid-control.service.in
@@ -4,7 +4,7 @@
 
 [Service]
 Restart=always
-ExecStart={bindir}/swampd
+ExecStart=@BINDIR@/swampd
 RestartSec=5
 StartLimitInterval=0
 Type=simple