-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Portability 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
test
command, 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 == foo
on a platform that does not support the==
operator, the result will be false instead of true. This can leadto unexpected behavior.