r747: optionally compile example main func