Hi, I'm sorry but in my experience, getting auto-gen scripts to cross-compile between architectures properly never seem to work very well for me. My recommendation would be to take a look at all the available options for the autogen script that you're using.
Again, from experience, look for options that let you set:
(1) the architecture (set to nios2-elf)
(2) the location of the toolchain (to find the location of the toolchain, try "which nios2-elf-gcc")
(3) the location of libc ($UCLIBC_PLUGIN/lib)
(4) the location of the libc header files ($UCLIBC_PLUGIN/inc)
Once all those are set, if the code for your library was designed well enough, then the library should compile. If not, then you'll need to start sifting through the generated Makefiles and working through some of the mechanics to figure out what went wrong.
This is about as far as I can go in terms of providing free support. If you have any specific questions about location of files, or error messages, I might be able to help you. But I can't just start going through the files you provided, for that you would need to contact us (Microtronix) for an actual support contract of some sort.
I hope this helps, and good luck.