On 6/17/10, Eric Blake <ebl...@redhat.com> wrote: > On 06/17/2010 11:33 AM, Sam Steingold wrote: > > some gnulib modules (e.g., gnulib/m4/libunistring-base.m4) have > > facilities for comparing version numbers, e.g., 1.5.22 with 2.2.8. > > it would be nice if there were a module (say, version-compare) which > > would export such a facility. > > e.g., @VERSION_COMPARE@ would expand to > > version_compare() { > > ... > > } > > which would return 0 or 1 depending on whether $1 is smaller than $2. > > Are you talking about version comparisons at m4 time (if so, is > m4_version_compare from autoconf adequate?), at shell time (if so, is > AS_VERSION_COMPARE from autoconf adequate?), or in your executable (if > so, is either the strverscmp or filevercmp module adequate?).
at shell time, but not in configure. I have a shell file foo.in which is processed by configure using AC_CONFIG_FILES, and I want to be able to compare versions there. -- Sam Steingold <http://sds.podval.org>