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