GNOME Bugzilla – Bug 643799
need to detect mozjs status for debian/ubuntu
Last modified: 2012-09-06 22:00:15 UTC
For GP Linux forks which put spidermonkey in a versioned directory like /usr/lib/xulrunner-1.2.3 and also do *not* add it to /etc/ld.so.conf.d, we need to add it to LD_LIBRARY_PATH dynamically. There are two approaches to dealing with this; compile time and run time. * compile time: (for ELF binaries) detect where libmozjs.so lives and add an rpath to it. * runtime: Run pkg-config While compile time would be nice, unfortunately we can't do it for gnome-shell because we're a plugin for mutter. So what we should do is: * Detect this situation in configure * Use it to generate a wrapper script /usr/libexec/gnome-shell/mozjs-wrapper * Use the wrapper at both compile time (for introspection dumping) and in the installed /usr/bin/gnome-shell script.
Why can't it be done compile time? It works for libgnome-bluetooth-applet, which is installed in $(libdir)/gnome-bluetooth, and compile-time linked with libgnome-shell.
We have a binary, and we use libjs185, not xulrunner. Anything else is a disto bug now!