unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Checking for guile from configure -- forward compat.
@ 2009-08-08  6:45 Peter TB Brett
  2009-08-08 16:59 ` Linas Vepstas
  2009-08-14  7:26 ` Peter Brett
  0 siblings, 2 replies; 8+ messages in thread
From: Peter TB Brett @ 2009-08-08  6:45 UTC (permalink / raw)
  To: guile-user

[-- Attachment #1: Type: text/plain, Size: 870 bytes --]

Hi everyone,

Currently, there appear to be two ways to check for the presence of
Guile:

  PKG_CHECK_MODULES(GUILE, [guile-1.8])

Or:

  GUILE_FLAGS

Unfortunately, the first of these *only* works for Guile 1.8 -- so if
some has, at some point in the future, Guile 2.x, we'll have to add
some m4 magic for sequentially trying 1.8 and every valid x for 2.x.

On the other hand, GUILE_FLAGS uses the guile-config tool, which IIRC is
going to go away Soon (tm).

What would you recommend as the Right Way to check for Guile 1.8.0 or
later in my configure script and set the appropriate flags, in a
forward-compatible way?  Or am I just going to have to write a pile of
crufty m4/shell?

Thanks in advance,

                                       Peter

-- 
Peter Brett <peter@peter-b.co.uk>
Remote Sensing Research Group
Surrey Space Centre

[-- Attachment #2: Type: application/pgp-signature, Size: 196 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Checking for guile from configure -- forward compat.
  2009-08-08  6:45 Checking for guile from configure -- forward compat Peter TB Brett
@ 2009-08-08 16:59 ` Linas Vepstas
  2009-08-08 19:39   ` Peter TB Brett
  2009-08-14  7:26 ` Peter Brett
  1 sibling, 1 reply; 8+ messages in thread
From: Linas Vepstas @ 2009-08-08 16:59 UTC (permalink / raw)
  To: Peter TB Brett; +Cc: guile-user

2009/8/8 Peter TB Brett <peter@peter-b.co.uk>:
> Hi everyone,
>
> Currently, there appear to be two ways to check for the presence of
> Guile:
>
>  PKG_CHECK_MODULES(GUILE, [guile-1.8])

I believe that the following should work:

PKG_CHECK_MODULES(GUILE, guile >= 1.8.3)

or something like that. Grepping various configure.in
I find the following:

PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.0.0)
PKG_CHECK_MODULES([HUNSPELL], [hunspell])
PKG_CHECK_MODULES(LIBJDK, libjdk-1.5 >= $LIBJDK_REQUIRED)

--linas




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Checking for guile from configure -- forward compat.
  2009-08-08 16:59 ` Linas Vepstas
@ 2009-08-08 19:39   ` Peter TB Brett
  2009-08-13 22:12     ` Neil Jerram
  0 siblings, 1 reply; 8+ messages in thread
From: Peter TB Brett @ 2009-08-08 19:39 UTC (permalink / raw)
  To: guile-user

Linas Vepstas <linasvepstas <at> gmail.com> writes:
> 2009/8/8 Peter TB Brett <peter <at> peter-b.co.uk>:
> > Hi everyone,
> >
> > Currently, there appear to be two ways to check for the presence of
> > Guile:
> >
> >  PKG_CHECK_MODULES(GUILE, [guile-1.8])
> 
> I believe that the following should work:
> 
> PKG_CHECK_MODULES(GUILE, guile >= 1.8.3)
> 
> or something like that. Grepping various configure.in
> I find the following:
> 
> PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.0.0)
> PKG_CHECK_MODULES([HUNSPELL], [hunspell])
> PKG_CHECK_MODULES(LIBJDK, libjdk-1.5 >= $LIBJDK_REQUIRED)

I'm perfectly aware of how to use pkg-config, and I think I already pointed out
that this isn't very useful because Guile provides a 'guile-1.8' pkg-config
module file, but not one for 'guile'.

Cheers,

                                 Peter





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Checking for guile from configure -- forward compat.
  2009-08-08 19:39   ` Peter TB Brett
@ 2009-08-13 22:12     ` Neil Jerram
  2009-08-14  1:36       ` Andreas Rottmann
  0 siblings, 1 reply; 8+ messages in thread
From: Neil Jerram @ 2009-08-13 22:12 UTC (permalink / raw)
  To: Peter TB Brett; +Cc: guile-user

Peter TB Brett <peter@peter-b.co.uk> writes:

> I'm perfectly aware of how to use pkg-config, and I think I already pointed out
> that this isn't very useful because Guile provides a 'guile-1.8' pkg-config
> module file, but not one for 'guile'.

So what does pkg-config recommend for a situation like this?  Or does
it not support having two versions installed at the same time?

Thanks,
        Neil




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Checking for guile from configure -- forward compat.
  2009-08-13 22:12     ` Neil Jerram
@ 2009-08-14  1:36       ` Andreas Rottmann
  2009-08-14 21:31         ` Neil Jerram
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Rottmann @ 2009-08-14  1:36 UTC (permalink / raw)
  To: Neil Jerram; +Cc: guile-user, Peter TB Brett

Neil Jerram <neil@ossau.uklinux.net> writes:

> Peter TB Brett <peter@peter-b.co.uk> writes:
>
>> I'm perfectly aware of how to use pkg-config, and I think I already pointed out
>> that this isn't very useful because Guile provides a 'guile-1.8' pkg-config
>> module file, but not one for 'guile'.
>
> So what does pkg-config recommend for a situation like this?  Or does
> it not support having two versions installed at the same time?
>
IIRC/IIUC, there can be only a single version (with a given .pc file
name) installed at the same time; if you want multiple versions
parallel-installable, you have to use different .pc file names.

Regards, Rotty
-- 
Andreas Rottmann -- <http://rotty.yi.org/>




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Checking for guile from configure -- forward compat.
  2009-08-08  6:45 Checking for guile from configure -- forward compat Peter TB Brett
  2009-08-08 16:59 ` Linas Vepstas
@ 2009-08-14  7:26 ` Peter Brett
  2009-08-14 21:32   ` Neil Jerram
  1 sibling, 1 reply; 8+ messages in thread
From: Peter Brett @ 2009-08-14  7:26 UTC (permalink / raw)
  To: guile-user

Peter TB Brett <peter@peter-b.co.uk> writes:

> Hi everyone,
>
> Currently, there appear to be two ways to check for the presence of
> Guile:
>
>   PKG_CHECK_MODULES(GUILE, [guile-1.8])
>
> Or:
>
>   GUILE_FLAGS
>
> Unfortunately, the first of these *only* works for Guile 1.8 -- so if
> some has, at some point in the future, Guile 2.x, we'll have to add
> some m4 magic for sequentially trying 1.8 and every valid x for 2.x.
>
> On the other hand, GUILE_FLAGS uses the guile-config tool, which IIRC is
> going to go away Soon (tm).
>
> What would you recommend as the Right Way to check for Guile 1.8.0 or
> later in my configure script and set the appropriate flags, in a
> forward-compatible way?  Or am I just going to have to write a pile of
> crufty m4/shell?

We ended up writing a pile of crufty m4/shell, which:

- checks for guile-1.8.pc
- if that fails, checks for guile-2.0.pc
- if that fails, checks for guile-config

  http://git.gpleda.org/?p=gaf.git;a=blob;f=m4/geda-guile.m4;hb=HEAD

Ewww.

                                  Peter


-- 
Peter Brett <peter@peter-b.co.uk>
Remote Sensing Research Group
Surrey Space Centre





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Checking for guile from configure -- forward compat.
  2009-08-14  1:36       ` Andreas Rottmann
@ 2009-08-14 21:31         ` Neil Jerram
  0 siblings, 0 replies; 8+ messages in thread
From: Neil Jerram @ 2009-08-14 21:31 UTC (permalink / raw)
  To: Andreas Rottmann; +Cc: guile-user, Peter TB Brett

Andreas Rottmann <a.rottmann@gmx.at> writes:

> Neil Jerram <neil@ossau.uklinux.net> writes:
>
>> Peter TB Brett <peter@peter-b.co.uk> writes:
>>
>>> I'm perfectly aware of how to use pkg-config, and I think I already pointed out
>>> that this isn't very useful because Guile provides a 'guile-1.8' pkg-config
>>> module file, but not one for 'guile'.
>>
>> So what does pkg-config recommend for a situation like this?  Or does
>> it not support having two versions installed at the same time?
>>
> IIRC/IIUC, there can be only a single version (with a given .pc file
> name) installed at the same time; if you want multiple versions
> parallel-installable, you have to use different .pc file names.

Thanks.  The pkg-config man page says the same thing, so I'm sure
you're right.

    Neil




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Checking for guile from configure -- forward compat.
  2009-08-14  7:26 ` Peter Brett
@ 2009-08-14 21:32   ` Neil Jerram
  0 siblings, 0 replies; 8+ messages in thread
From: Neil Jerram @ 2009-08-14 21:32 UTC (permalink / raw)
  To: Peter Brett; +Cc: guile-user

Peter Brett <peter@peter-b.co.uk> writes:

> We ended up writing a pile of crufty m4/shell, which:
>
> - checks for guile-1.8.pc
> - if that fails, checks for guile-2.0.pc
> - if that fails, checks for guile-config
>
>   http://git.gpleda.org/?p=gaf.git;a=blob;f=m4/geda-guile.m4;hb=HEAD
>
> Ewww.

That looks good to me.  Seriously, given the shift from guile-config
to pkg-config, I don't think it's possible to get any simpler than
that; and you've wrapped it very nicely.

Regards,
        Neil




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-08-14 21:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-08  6:45 Checking for guile from configure -- forward compat Peter TB Brett
2009-08-08 16:59 ` Linas Vepstas
2009-08-08 19:39   ` Peter TB Brett
2009-08-13 22:12     ` Neil Jerram
2009-08-14  1:36       ` Andreas Rottmann
2009-08-14 21:31         ` Neil Jerram
2009-08-14  7:26 ` Peter Brett
2009-08-14 21:32   ` Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).