guile-user
[Top][All Lists]
Advanced

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

Re: How should I check for Guile in configure.in?


From: Martin Grabmueller
Subject: Re: How should I check for Guile in configure.in?
Date: Wed, 16 May 2001 22:09:10 +0200

> From: Lars Luthman <address@hidden>
> Date: Wed, 16 May 2001 20:40:52 +0200
> 
> I'm writing an application that will use Guile as an embedded scripting
> language, and I'm wondering what the correct way to check for it in my
> configure.in would be. At the moment I'm using AC_CHECK_LIB(guile,
> gh_enter) , but I don't think that is portable since guile seems to
> require other libraries on other platforms. The libraries needed are
> listed by 'guile-config link', but I'm not sure how to use that
> information. Does anyone know the "correct" way to do it?

Don't know if that's `correct', but I'm using this for my Guile
extensions (it is actually stolen from Neil Jerram's guile-xlib
package):

AC_DEFUN([GUILE_FLAGS],[
## The GUILE_FLAGS macro.
  ## First, let's just see if we can find Guile at all.
  AC_MSG_CHECKING(for Guile)
  guile-config link > /dev/null || {
    echo "configure: cannot find guile-config; is Guile installed?" 1>&2
    exit 1
  }
  GUILE_CFLAGS="`guile-config compile`"
  GUILE_LDFLAGS="`guile-config link`"
  AC_SUBST(GUILE_CFLAGS)
  AC_SUBST(GUILE_LDFLAGS)
  AC_MSG_RESULT(yes)
])

GUILE_FLAGS
if test "`guile -c '(display (string>=? (version) "1.4.1"))'`" != "#t"; then
  AC_MSG_ERROR([Your Guile is too old.  You need CVS Guile January 2001 or 
later.])
fi

You might also want to check my Guile extension template package at

http://www.pintus.de/mgrabmue/guile/guile-extension-0.0.1.tar.gz

which includes configure.in, Makefile.am and similar stuff for writing
Guile extension.  Might be useful for embedding applications, too.

Regards,
  'martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]