diff --git a/configure.in b/configure.in
index 543b3346303630c9db730e8a787b784fcf77be68..97893c364dc62328984e870b7f3222ea4f69576d 100644
--- a/configure.in
+++ b/configure.in
@@ -329,6 +329,8 @@ AC_SUBST(BINDIR)
 
 LOCALSTATEDIR=`eval echo $localstatedir`
 AC_SUBST(LOCALSTATEDIR)
+AC_DEFINE_UNQUOTED(LOCALSTATEDIR,"$LOCALSTATEDIR")
+AC_DEFINE([LOCALSTATEDIR], [], [Default location to store state files.])
 
 # Set CFLAGS _after_ all the above checks, since our warnings are stricter
 # than autoconf's macros like.