Blog Archives

m4 macro to check if SQLite was compiled thread-safe

If your application is using SQLite, you may be assuming it is always compiled thread-safe, but this is not true. It will only be compiled thread-safe (with proper mutexes enabled) if the SQLITE_THREADSAFE preprocessor macro is set to 1 (serialized) or 2 (multi-threaded) (1/serialized is the default if not explicitly stated). If SQLITE_THREADSAFE is set to 0 during compilation of SQLite, it will not be thread-safe. Also note that if compiled thread-safe (1 or 2), the thread-safety mode (serialized or multi-threaded) can later be changed in runtime. See SQLite and Multiple Threads for more information.

SQLite provides the sqlite3_threadsafe() method to check whether the library was compiled thread-safe, but if your application really needs a thread-safe SQLite, you don’t want to check it during runtime. Thus, I wrote a small m4 macro that you can use in your to check it when running ./configure

Just add this file in your m4 directory:

And then, in your

if test "x$ax_cv_sqlite_threadsafe" != "xyes"; then
  AC_MSG_ERROR([sqlite3 is not compiled thread-safe])

Ubuntu packaging updates: dbus 1.3.1, sqlite 3.7.1 and gnu psychosynth 0.1.5

SQLite and DBus

I’ve been lately packaging the latest releases of several programs for Ubuntu Lucid (or Trisquel Taranis), mainly due to our bleeding-edge requirements in Tracker. You can find them in my personal PPAs in Launchpad:

The real packaging work was done by the Debian guys, of course (kudos to them!); I just prepared the necessary bits to make them get compiled as Ubuntu packages.

GNU Psychosynth

In addition to this, during the last GNU Hackers Meeting in The Hague, I also changed the Ubuntu packaging of GNU Psychosynth, the most entertaining music synthesizer I’ve ever played with. The latest packages are now available in the GNU Psychosynth Team’s PPA, and right now only Ubuntu versions >= Lucid will be supported (as they no longer require Andrew Fenn’s Ogre Development PPA).

More information in:

Oh, and Juan Pedro was able to do another demonstration of GNU Psychosynth during the meeting, which got recorded, so that you can understand what this great program does… watch it and enjoy!


Get every new post delivered to your Inbox.

Join 36 other followers