Caused by error in last commit which used HAVE_LIBSODIUM instead of HAVE_SODIUM. Solution: use HAVE_LIBSODIUM as we do in other configure scripts. The project is called 'libsodium' and not 'sodium'.