As I again came across problems with autofoo used in Gammu, I started to look for some alternative. As I heard good things about CMake, I decided to give it a try.
After few minutes I was able to build Gammu using CMake. Well it now probably fails if you don't have MySQL or Bluez installed, but it should not be hard to resolve. Also it doesn't generate config.h file right now, but that's again nothing hard.
I will probably add CMake as alternative build system (it can safely coexists with autofoo) in one of next Gammu releases as it is much easier to write and understand than autofoo madness.
Brave users can unpack gammu-cmake.tar.bz2 into Gammu sources and try it :-).