Skip to content
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

autogen.sh check_version function doesn't work correctly #11

Open
ryandesign opened this issue Aug 4, 2024 · 0 comments · May be fixed by #15
Open

autogen.sh check_version function doesn't work correctly #11

ryandesign opened this issue Aug 4, 2024 · 0 comments · May be fixed by #15

Comments

@ryandesign
Copy link
Contributor

The check_version function in autogen.sh does not work correctly. It checks the version numbers using simple string comparison:

check_version ()
{
if expr $1 \>= $2 > /dev/null; then
echo "yes (version $1)"
else
echo "Too old (found version $1)!"
DIE=1
fi
}

Version numbers cannot be compared in that manner. The consequence is that, when you were requiring a minimum of automake 1.6:

AUTOMAKE_REQUIRED_VERSION=1.6

if the user's version of automake was 1.10 or greater, then the user would get a complaint like:

-n checking for automake >= 1.6 ... 
Too old (found version 1.16.5)!

because of course the string 1.16.5 sorts before the string 1.6.

This was reported to MacPorts here:

https://trac.macports.org/ticket/70485

carlobaldassi added a commit that referenced this issue Aug 30, 2024
@carlobaldassi carlobaldassi linked a pull request Aug 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant