Add new comment

Autotools support

Hi,

I found out about LibRaw as Shotwell[1] 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[2] 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[3]. 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 ./configure.

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. ;)

Creers,

corec

[1]: http://yorba.org/shotwell/
[2]: http://pkg-config.freedesktop.org/wiki/
[3]: http://github.com/corec/libraw-automake

PS. Could you consider of adding .patch files to allowed attachment so we wouldn't have to rename files.

AttachmentSize
Plain text icon LibRaw-automake-patch-v1.txt17.86 KB

Forums: