if you're going to patch configure.ac instead of configure, you need to run autotools so 'inherit autotools' and add 'eautoreconf' to the end of src_unpack() also, you should never run 'grep' yourself in configure scripts ... always use ${EGREP}
Thanks for reporting and for the solution. Fixed in CVS.