Perform option checking in ./configure like autotools does

Discussion over at OPM/dune-cornerpoint#10