From: des Date: Thu, 18 Oct 2007 15:18:42 +0000 (+0000) Subject: Make VARNISH_STATE_DIR work correctly when using the default prefix. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b1b349bfcf62ae233e5f20861a2a2fdb3d1a2c6;p=varnish Make VARNISH_STATE_DIR work correctly when using the default prefix. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2116 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/Makefile.am b/varnish-cache/bin/varnishd/Makefile.am index abcfea66..5cbee2c6 100644 --- a/varnish-cache/bin/varnishd/Makefile.am +++ b/varnish-cache/bin/varnishd/Makefile.am @@ -64,7 +64,8 @@ noinst_HEADERS = \ steps.h \ stevedore.h -varnishd_CFLAGS = -include config.h +varnishd_CFLAGS = -include config.h \ + -DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"' varnishd_LDFLAGS = -export-dynamic diff --git a/varnish-cache/configure.ac b/varnish-cache/configure.ac index 269befe9..07e136cc 100644 --- a/varnish-cache/configure.ac +++ b/varnish-cache/configure.ac @@ -115,9 +115,8 @@ AC_CHECK_FUNCS([epoll_ctl]) AC_CHECK_FUNCS([poll]) # Run-time directory -VARNISH_STATE_DIR=`eval "echo $localstatedir/varnish"` -AC_DEFINE_UNQUOTED(VARNISH_STATE_DIR, "$VARNISH_STATE_DIR", - [Base directory for run-time state]) +VARNISH_STATE_DIR="${localstatedir}/varnish" +AC_SUBST(VARNISH_STATE_DIR) # Now that we're done using the compiler to look for functions and # libraries, set CFLAGS to what we want them to be for our own code diff --git a/varnish-cache/lib/libvarnishapi/Makefile.am b/varnish-cache/lib/libvarnishapi/Makefile.am index c47ddd68..5a6114a4 100644 --- a/varnish-cache/lib/libvarnishapi/Makefile.am +++ b/varnish-cache/lib/libvarnishapi/Makefile.am @@ -9,4 +9,5 @@ libvarnishapi_la_SOURCES = \ instance.c \ shmlog.c -libvarnishapi_la_CFLAGS = -include config.h +libvarnishapi_la_CFLAGS = -include config.h \ + -DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"'