In autogen.sh fix bug in default for build dir

Wasn't working correctly when the root dir was changed.
Add function + enum to check element geometry

i.e. either T or Q