[PATCH 2/4] fix hardcoded value of XPRINTDIR

Ademar de Souza Reis Jr. ademar at mandriva.com.br
Wed Jul 4 14:22:35 PDT 2007


On Wed, Jul 04, 2007 at 12:05:37AM +0100, Daniel Stone wrote:
> On Tue, Jul 03, 2007 at 02:20:22PM -0700, Dan Nicholson wrote:

<snip>

> > 
> > Since xpconfigdir is AC_SUBSTed, wouldn't it be better to use
> > $(xpconfigdir) there so it's substituted by make? That would ensure
> > that all variables are resolved and you don't inadvertantly encode
> > ${somevar} into xprint.
> 
> You need AC_DEFINE_DIR, instead of AC_SUBST.

Additional patch below:

[PATCH] use AC_DEFINE_DIR(XPRINTDIR, ...) for xpconfigdir

Notice that xpconfigdir is used extensively, so this
change alone won't have much effect
---
 configure.ac |    1 +
 cpprules.in  |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 26f6b6f..82b5b7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1597,6 +1597,7 @@ if test "x$XPRINT" = xyes; then
 				[ xpconfigdir="$withval" ],
 				[ xpconfigdir="$sysconfdir/X11/xprint" ])
 	AC_SUBST([xpconfigdir])
+	AC_DEFINE_DIR(XPRINTDIR, xpconfigdir, [Directory to store xprint configuration data])
 
 	AC_PATH_PROG(MKFONTSCALE, mkfontscale)
 	AC_PATH_PROG(MKFONTDIR, mkfontdir)
diff --git a/cpprules.in b/cpprules.in
index 08da5fa..1eb5eca 100644
--- a/cpprules.in
+++ b/cpprules.in
@@ -38,7 +38,7 @@ MANDEFS = \
 	-D__projectroot__=$(prefix) \
 	-D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \
 	-D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) \
-	-D__xprintdir__=@xpconfigdir@
+	-D__xprintdir__=$(XPRINTDIR)
 
 .pre:
 	$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@
-- 
1.5.2.2



-- 
Ademar de Souza Reis Jr.
Mandriva - http://www.mandriva.com.br

^[:wq!



More information about the xorg mailing list