Merge changes I9bc7b609,Ie56dc965,Ic57d46bf,I3f2ab549,I3ad715fa, ... into integration

* changes:
  refactor(build): initialise `arch-features` closer to where it is needed
  refactor(build): define the W and DEBUG flags in the standard way
  refactor(build): put the cross referencing of options together
  fix: use LDLIBS instead of LDFLAGS for library search paths
  fix(build): remove redundant variables
  fix(intel): fix variable may be used uninitialized error