You have to replace these lines with something similar to this (change libaacs to libgcrypt everywhere). Then run autoreconf -iv (you must have autoconf installed). It will create a new ./configure script which will work if you did everything correctly.