On balance I think it would be better to check for strict equality to `../dmd/src/dmd`.  Re `DFLAGS`: this is how it's done in the other build scripts (for druntime and phobos), see e.g.: https://github.com/D-Programming-Language/phobos/blob/master/posix.mak#L132 -- so I tried to follow the same principles here.

Re the need for `no-warn-search-mismatch`: all I can say is that absent this setting, I was getting horrible errors; with it, I wasn't; and if I recall, that same issue applied to trying to build anything with any `dmd` on my system, ever.  It's one of the recommended `dmd.conf` settings: http://wiki.dlang.org/Building_DMD#Installation