build: add 'findcmdopt' to find optional commands.