Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPortability fixes for configure #270
Conversation
The `test` command, as well as the `[` command, is not required to know the `==` operator. Only a few implementations like bash and some versions of ksh support it. When you run `test foo == foo` on a platform that does not support the `==` operator, the result will be false instead of true. This can lead to unexpected behavior.
|
I have memories of having fought this before, making me unlikely to wanting to return to this. We also recommend filing an issue ticket prior to making PRs to not waste effort. So let's turn this then into the issue you never filed: What type of platform would require this? |
|
Thank you for quick feedback. NetBSD is one of the platforms requiring this change. I am a developer of pkgsrc, the package management system for NetBSD and many other OS's, and had to add this change as a local patch when I packaged RcppArmadillo for pkgsrc. I understand your concern about potential problems a build script change like this may cause. However, this PR is not adding anything that RcppArmadillo is not already using. RcppArmadillo's
and even
So, changing |
|
FWIW As far as I know, |
|
I looked more closely (now that I am back from traveling) and the changes to |
|
Some of those pre-dated my PR ;-) |
|
;-) No worries. |
The
testcommand, as well as the[command, is not required toknow the
==operator. Only a few implementations like bash and someversions of ksh support it.
When you run
test foo == fooon a platform that does not support the==operator, the result will be false instead of true. This can leadto unexpected behavior.