From 4f032ca35a7086b76775e4b53c6b99ba4e1eb3cb Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 3 Nov 2008 23:23:09 +0000 Subject: [PATCH] [trace] Install cairo-trace.so into $(libdir)/cairo Install the auxiliary library into the cairo subdirectory within the lib path, so that it doesn't clutter $(libdir) and sets a precedent for future auxiliary libraries. --- util/cairo-trace/Makefile.am | 7 ++++--- util/cairo-trace/cairo-trace.in | 13 ++++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/util/cairo-trace/Makefile.am b/util/cairo-trace/Makefile.am index b927768d9..c6caf0c67 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; EXTRA_DIST = \ COPYING \ diff --git a/util/cairo-trace/cairo-trace.in b/util/cairo-trace/cairo-trace.in index ee3816147..93bb954c6 100644 --- a/util/cairo-trace/cairo-trace.in +++ b/util/cairo-trace/cairo-trace.in @@ -49,10 +49,17 @@ if test -z "$nofile"; then filename=`basename $1`.$$.trace fi +LD_PRELOAD=@libdir@/cairo/cairo-trace.so +export LD_PRELOAD + +# Force the decimal output to the 'C' locale +LC_ALL=C +export LC_ALL + if test -z "$filename"; then - LD_PRELOAD=@libdir@/cairo-trace.so CAIRO_TRACE_FD=3 LC_ALL=C $* 3>&1 >/dev/null + CAIRO_TRACE_FD=3 $* 3>&1 >/dev/null elif test -n "$silent"; then - LD_PRELOAD=@libdir@/cairo-trace.so LC_ALL=C CAIRO_TRACE_OUTFILE_EXACT=$filename $* + CAIRO_TRACE_OUTFILE_EXACT=$filename $* else - LD_PRELOAD=@libdir@/cairo-trace.so CAIRO_TRACE_FD=3 LC_ALL=C $* 3>&1 >/dev/null | tee $filename + CAIRO_TRACE_FD=3 $* 3>&1 >/dev/null | tee $filename fi