simplicy the check for infinite loop
Don't check `$(uname -s)` twice
Use `package_option()` to setup configure options