diff options
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 15 |
2 files changed, 17 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index be5dd09fe..63ff205c2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,8 +1,8 @@ - AM_CPPFLAGS = \ -include config.h \ -I$(top_srcdir)/include \ - -DLOCALEDIR=\"$(localedir)\" + -DLOCALEDIR=\"$(localedir)\" \ + -D_PATH_LOCALSTATEDIR=\"${localstatedir}\" AM_CFLAGS = -fsigned-char $(WARN_CFLAGS) AM_LDFLAGS = diff --git a/configure.ac b/configure.ac index 400576833..a86d42e53 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,21 @@ NONE:NONE | NONE:/usr | /usr:*) esac ;; esac +case $prefix:$localstatedir in + NONE:'${prefix}/var') + localstatedir=/run + AC_MSG_NOTICE([ --localstatedir defaults to /run]) + ;; + *:'${prefix}/var') + localstatedir=${prefix}/run + ;; + NONE:*) + ;; + *:*) + localstatedir=${prefix}/${localstatedir} + ;; +esac + libdirname=`basename "$libdir"` AC_SUBST([libdirname]) |