fixing autotools project

Removed files that are autogenerated and should not be checked in + cleaned up autotools project such that a correct library with version support is built.

Also fixed some issues in m1riwrappers.h