This is the archive for November 2006. Recent posts can be found at the main blog page.

Using autotools to detect Python modules

Dear lazyweb,

When detecting Python GTK/Gnome modules in configure.ac, should I use this check:

PKG_CHECK_MODULES(pygtk, pygtk-2.0)

...or this check:

if ! $PYTHON -c 'import gtk' > /dev/null 2>&1; then 
  AC_MSG_ERROR([Python module 'gtk' not found])
fi

The pkg-config call requires the development packages from distributions, which I doubt are needed. On the other hand, what purpose serve the .pc files for the various Python GTK/Gnome packages if we don’t use them in configure.ac at all?

Any clue? Contact me (uws) on irc.gnome.org or mail me. Thanks!

Update 1: I received some responses.