You need to run aclocal before autogen.sh or ./configure. If you dont have it, install automake or autotool.
Thanks, I installed automake and got a bit further but now I get the error
configure.ac:125: error: possibly undefined macro: AC_MSG_ERROR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.