Re: gtk-doc version and configure.in breakage



I came up with a shell version, in case anyone wants to use that
instead.  It's a straight port of the perl version below, so far it
seems to work O.K.

Here it is:

installed=`echo $gtk_doc_version | sed 's/\./ /g'`
required=`echo $gtk_doc_min_version | sed 's/\./ /g'`

for r in $required; do
    foo=`echo $installed | awk '{ print $1 }'`
    installed=`echo $installed | sed 's/^[^ ]\+ \?//'`
    if test ! -n "$foo"; then exit 1; fi

    if test "$foo" -lt "$r"; then exit 1; fi
    if test "$foo" -gt "$r"; then exit 0; fi
done

exit 0

If you want to test it by itself you can use this version:
http://sandmill.org/files/sh-test

-Dan

On Wed, 2002-11-20 at 16:43, Dan Mills wrote:
> Hi everyone,
> 
> Since gtk-doc went to version 0.10 a bunch of modules have stopped to
> build, because the check in configure.in for the gtk-doc version is too
> simplistic.
> 
> Specifically, the offending section is the following:
> 
>     if perl <<EOF ; then
>       exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
>             ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
> EOF
> 
> One way to fix it, still using perl, is to do this instead:
> 
>     if perl <<EOF ; then
> my @installed = split /\./, "$gtk_doc_version";
> my @required = split /\./, "$gtk_doc_min_version";
> 
> while (scalar @required) {
>     my \$installed_ver = (shift @installed || 0);
>     my \$required_ver = shift @required;
>     exit 1 if (\$installed_ver < \$required_ver);
>     exit 0 if (\$installed_ver > \$required_ver);
> }
> exit 0;
> EOF
> 
> You can use that, or make up your own check in shell, but please look
> through your configure.in and make sure you fix it--the build is totally
> broken atm because of this.
> 
> Your friendly tinderbox maintainer,
> -Dan
> 
> -- 
> Dan Mills, Desktop Ranger             -o)
> email: thunder(at)ximian(dot)com      /\\
> -----------------------------------\ _\_v
> Damn Sill.. Sand Mill?  All Minds! |_____
> 
> _______________________________________________
> gnome-hackers mailing list
> gnome-hackers gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-hackers
> 
_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]