mani-monaj/grSim — pull request #6 by Hawk777 (2011-10-08 19:13:59+00:00)
Title: Use pkg-config for ODE and protobuf

The ODE and protobuf libraries provide .pc files for pkg-config. It is proper to use pkg-config to link to these libraries, rather than just including the -l options directly. Also, "#define dDOUBLE" is very bad, because if someone installs a single-precision ODE, then the header files will declare double-precision prototypes but the library will contain single-precision code, which will probably cause crashes. Instead, you should respect the settings provided by the installed copy of ODE, which you get by using pkg-config: it will provide -dDOUBLE if the installed library is double-precision, or not if it is single-precision. This patch does exactly that.