[PATCH] DecodeIR autotools setup

Discussion forum for JP1 software tools currently in use, or being developed, such as IR, KM, RemoteMaster, and other misc apps/tools.

Moderator: Moderators

Post Reply
leamas
Posts: 7
Joined: Thu Mar 20, 2014 3:29 am

[PATCH] DecodeIR autotools setup

Post by leamas »

I have created a patch adding an autotools setup for DecodeIR. It's available at http://ur1.ca/k4g8n (copy here)

The short story is that I have packaged DecodeIR for Fedora (the package will be available in a day or two). While doing this I had to make a new Makefile to generate and install the so-libs/dlls. This is a Bad Thing, it's much better if the upstream (i. e., DecodeIR) has something which can be used as is. This patch resolves this by using autotools to create a Makefile which is adapted to the actual platform, be it Fedora or something else.

The patch does not change anything, it only adds some files. The added new code is about 50 lines, but here is also some documentation and a copy-pasted file. It is very straight-forward from an autotools point of view.

The patch adds dependencies to automake and autoconf. Using these, the workflow is the familiar (?)

$ autoreconf -fi
$ ./configure
$ make
$ sudo make install

For a packager or just any user this provides a way to build DecodeIR on any platform supporting autotools.This is basically everywhere (windows using cygwin)

The generated Makefile is not only adapted for the platform , it also provides more functionality than the current ones. Notably, here is a 'make install' which can be modified during ./configure as to where install things. Here is also a 'make dist' which is a nice command producing a tarball which is extremely usable when making a release. Also, 'make distcheck' checks that the build works from the tarball. And yes, cross-compilation is also supported.

Honestly, using autotools for this might be the second best choice. CMake is known to be somewhat better when targeting also Win32/64.. However, my own interest and skills does not really include CMake, so this is what I could come up with in a reasonable time. So if someone would offer a CMake setup instead I'm perfectly happy with that. However, until that happens I suggest that DecodeIR accepts this patch which handles platform dependencies in a consistent and to many developers familiar way.
Barf
Expert
Posts: 1524
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Post by Barf »

Nice to have in consolidated. 8-)

It works on Linux, it SHOULD work on Mac OS X and Cygwin (generating Windows libs), but I have not tested.

Let me add (not for you, for the rest) that the command to generate the 32 bit version on a 64 bit host is

Code: Select all

./configure CXXFLAGS=-m32
If no-one complains, I will check it in.
Post Reply