unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-user@gnu.org
Subject: Re: how to write a 'configure.ac' for an* optional* support of libguile.
Date: Fri, 15 Dec 2017 23:51:07 +0100	[thread overview]
Message-ID: <87o9mzehb8.fsf@gnu.org> (raw)
In-Reply-To: a4687d53-22e8-89f8-d06a-c4db86048a0c@univ-nantes.fr

Hello,

Pierre Lindenbaum <pierre.lindenbaum@univ-nantes.fr> skribis:

>     AC_MSG_CHECKING(for Guile)
>     guile-config link > /dev/null || {
>         echo "configure: cannot find guile-config; is Guile installed?" 1>&2
>         exit 1
>       }
>     CFLAGS="$CFLAGS `guile-config compile`"
>     LDFLAGS="$LDFLAGS `guile-config link`"
>     AC_DEFINE([HAVE_GUILE],[1],[Guile supported])
>
>     #PKG_CHECK_MODULES([GUILE],[guile-2.0])
>     #AC_CHECK_HEADERS([libguile.h], [], [AC_MSG_ERROR([guile include files not found])])
>     #AC_CHECK_LIB([guile], [scm_with_guile], [AC_MSG_ERROR([guile library files not found])])

‘guile-config’ is deprecated.  ‘PKG_CHECK_MODULES’ works, but the
recommended approach is to use the ‘GUILE_PKG’ Autoconf macro, as in:

  dnl Try Guile 2.2, then 2.0.
  dnl https://www.gnu.org/software/guile/manual/html_node/Autoconf-Macros.html
  GUILE_PKG([2.2 2.0])

When you do that you can omit ‘AC_CHECK_HEADERS’ and ‘AC_CHECK_LIB’.

For more details I’d suggest looking at existing code such as
guile-ncurses, GnuTLS, etc.

HTH!

Ludo’.




      reply	other threads:[~2017-12-15 22:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15  8:40 how to write a 'configure.ac' for an* optional* support of libguile Pierre Lindenbaum
2017-12-15 22:51 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9mzehb8.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).