misc: improve src detection in configure script