[cairo] [cairo-commit] 3 commits - configure.ac src/cairoint.h src/cairo-surface.c src/cairo-surface-fallback.c src/cairo-types-private.h util/cairo-trace

Behdad Esfahbod behdad at behdad.org
Mon Nov 3 22:34:14 PST 2008


Chris Wilson wrote:
> diff --git a/util/cairo-trace/Makefile.am b/util/cairo-trace/Makefile.am
> index b927768..c6caf0c 100644
> --- a/util/cairo-trace/Makefile.am
> +++ b/util/cairo-trace/Makefile.am
> @@ -1,5 +1,6 @@
>  bin_SCRIPTS = cairo-trace
> -lib_LTLIBRARIES = cairo-trace.la
> +cairolibdir = @libdir@/cairo
> +cairolib_LTLIBRARIES = cairo-trace.la
>  
>  AM_CPPFLAGS = -I$(top_srcdir)/src \
>  	      -I$(top_builddir)/src
> @@ -13,10 +14,10 @@ cairo_trace_la_LDFLAGS = -module -no-undefined
>  cairo_trace_la_LIBADD = -ldl -lz $(BFD_LIBS)
>  
>  system-install:
> -	grep -sq @libdir@/cairo-trace.so /etc/ld.so.preload || echo @libdir@/cairo-trace.so >> /etc/ld.so.preload
> +	grep -sq @cairolibdir@/cairo-trace.so /etc/ld.so.preload || echo @libdir@/cairo-trace.so >> /etc/ld.so.preload
>  
>  system-uninstall:
> -	sed -e '@libdir@\/cairo-trace.so/d' < /etc/ld.so.preload > /tmp/ld.so.preload && mv /tmp/ld.so.preload /etc/ld.so.preload;
> +	sed -e '@cairolibdir@\/cairo-trace.so/d' < /etc/ld.so.preload > /tmp/ld.so.preload && mv /tmp/ld.so.preload /etc/ld.so.preload;

I'm pretty sure "@cairolibdir@" doesn't expand to what you expect.  It's quite
simple: "@varname@" is replaced by configure.  "$(varname)" is done by make.
"$(varname)" is preferred as user can override on make command line ("make
varname=foo").  In this case, you have a "cairolibdir" make var.  You don't
have a AC_SUBST in configure for it, so "@cairolibdir@" will stay as is.

That's why you should just always use the "$(varname)" syntax.  autoconf and
automake make all your AC_SUBST'ed vars available as make vars.

behdad


More information about the cairo mailing list