and tweaking Makefile.am to properly link its library original diff from kn. Tweaks made by me. ok kn