mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-25 17:40:10 +01:00
[trace] Look harder for the cairo-trace.so library.
On OpenBSD the convention is to not use symlinks from unversioned library names to versioned library names. This breaks cairo-trace because it looks for cairo-trace.so explicitly, but on OpenBSD only cairo-trace.so.0.0 is installed. The right thing to do is probably to source the cairo-trace.la file and look for a file name there somehow. Instead this commit just looks for a likely looking file or symlink in the install directory.
This commit is contained in:
parent
a343c8c42d
commit
cd94bf8bf3
1 changed files with 16 additions and 1 deletions
|
|
@ -88,7 +88,22 @@ fi
|
|||
CAIRO_TRACE_PROG_NAME="$1"
|
||||
export CAIRO_TRACE_PROG_NAME
|
||||
|
||||
LD_PRELOAD=@libdir@/cairo/cairo-trace.so
|
||||
if test "x$CAIRO_TRACE_SO" = "x"; then
|
||||
CAIRO_TRACE_SO=""
|
||||
for lib in @libdir@/cairo/cairo-trace.so @libdir@/cairo/cairo-trace.so*; do
|
||||
if test -h "$lib" -o -f "$lib"; then
|
||||
CAIRO_TRACE_SO="$lib"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "x$CAIRO_TRACE_SO" = "x"; then
|
||||
echo "Could not find the cairo-trace shared library in @libdir@/cairo/." >&2
|
||||
echo "Set the CAIRO_TRACE_SO environment variable to the full path of the library." >&2
|
||||
exit 15
|
||||
fi
|
||||
|
||||
LD_PRELOAD="$CAIRO_TRACE_SO"
|
||||
export LD_PRELOAD
|
||||
|
||||
if test -n "$nocallers"; then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue