I found out about LibRaw as Shotwell has now started to use it. As I was compiling the lib for shotwell, I noticed that the Makefile is quite basic. As I'm using Gentoo Linux, which builds all packages from the source, automating the build of libraw with optional OpenMP and LCMS means quite a lot of sed etc. This got me thinking that maybe I could make the build system use the popular autotools and that way make building much more flexible and easier for other Linux users (and hopefully other OS users as well). At the same time I could learn about autotools too.
The first version of the autotoolified LibRaw is now working quite well with the usual make/make install/etc. stuff and following additional features:
- Users can enable/disable LCMS support, OpenMP support and building of examples
- pkg-config is used to check the optional LCMS dependency on the system
- generation of .pc files for pkg-config for both libraw.a and libraw_r.a
- autotools macro is used to detect if it's possible to enable OpenMP support and get the right parameter
I've also attached current version of the full patch to this post. My git repository which is based on the current LibRaw-0.10-beta3 is available at github. I couldn't find any public repo so if you have one somewhere, I can rebase my work on that if you want.
There is one remark as I didn't want to keep generated configure scripts etc at github repo, you have to run
autoreconf --install before running
Hopefully this benefits LibRaw as I hope it does. As I already stated, I'm just learning the automake/autoconf so there might some stupid stuff in the patch which I wasn't aware of. ;)
PS. Could you consider of adding .patch files to allowed attachment so we wouldn't have to rename files.