Re: guile.m4
Aaron VanDevender <[email protected]>
| Newsgroups | gmane.lisp.guile.user,gmane.lisp.guile.sources |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2006-06-14 at 01:17 +0100, Neil Jerram wrote:
> > +GUILE_CHECK([GUILE_CORRECT_VERSION_P],
> > + [(exit (let loop ((v1 (map string->number (string-split (version) (string-ref \".\" 0))))
> > + (v2 (map string->number (string-split \"$1\" (string-ref \".\" 0)))))
>
> Can we use #\. instead of (string-ref "." 0), or is the former a
> nightmare to quote correctly?
I tried to escape it, and I couldn't figure it out. And from
guile.m4:GUILE_CHECK:
# Avoid using the character "#" since that confuses autoconf.
It may not be possible. I don't know.
> > + (cond ((and (null? v1) (null? v2)) 0)
> > + ((null? v1) 0)
> > + ((null? v2) 1)
> > + ((> (car v1) (car v2)) 0)
> > + ((< (car v1) (car v2)) 1)
>
> Shouldn't the (null? v1) case have the same polarity as the (< v1 v2)
> case (because absence == 0) ?
Yes, you are correct. It should be:
(cond ((and (null? v1) (null? v2)) 0)
((null? v1) 1)
((null? v2) 0)
((> (car v1) (car v2)) 0)
((< (car v1) (car v2)) 1)
(else (loop (cdr v1) (cdr v2))))))
I had it all figured out with #f's and #t's instead of 1's and 0's, but
then I couldn't get it to escape in autoconf, so I guess I messed it up
when I switched to 0's and 1's.
Good eyes.
--
[email protected]
Plead the First.
_______________________________________________
Guile-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/guile-user