malloc() and related functions moved to stdlib.h many years ago in many (most? all?) standard unix-like systems, and some (for example, OS X) don't even ship the old malloc.h file at all any more. That can make libqalculate-0.9.7/src/qcalc.cc unbuildable. I think stdlib.h is sufficient to use on all systems, but if there are some that need malloc.h, you could use autoconf macro to see which is available and then protect the #include in qcalc.cc with #ifdef based on the config.h tokens.
Switched to stdlib. Thanks for pointing this out.