From: tomas@fabula.de
Cc: rm@fabula.de
Subject: Auto(conf|make) style questions
Date: Wed, 19 Mar 2003 18:21:04 +0100 [thread overview]
Message-ID: <20030319172104.GA6109@www> (raw)
Hi,
it's me again. I have some (kind of) working code and would like
to hear some comments.
My problem seems fairly generic; thus I'm surprised I haven't found
a ready-made one (I won't dismiss the possibility I'm blind. The
Enlightened may help me then ;-)
The Problem:
We're trying to build a library (call it guile-neon) which links to
an existing one (call it guile), and would like to inter-operate
with different versions. If an older version doesn't provide some
function, we'll have to do it ourselves. Kind of what AC_REPLACE_FUNCS
does at the libc level.
This is what I've come up with so far:
(from configure.in)
+------------------------------------------------------------------------------------------
| # Grrr. I'd like to use AC_REPLACE_FUNCS here.
| AC_CACHE_CHECK([whether your Guile has scm_c_string2str() (around version > 1.6.xx)],
| [guile_neon_cv_has_string2str],
| [guile_neon_save_CFLAGS=$CCFLAGS; CFLAGS="$CCFLAGS `guile-config compile`"
| guile_neon_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS `guile-config link`"
| AC_TRY_LINK([#include <libguile.h>],
| [int len; char *foo=scm_c_string2str(NULL, NULL, &len);],
| [guile_neon_cv_has_string2str=yes],
| [guile_neon_cv_has_string2str=no])
| LDFLAGS=$guile_neon_save_LDFLAGS
| CFLAGS=$guile_neon_save_CFLAGS
| ])
|
| if test "$guile_neon_cv_has_string2str" = "no"; then
| echo "Including scm_c_string2str.c in object files"
| AC_LIBOBJ(scm_c_string2str)
| fi
+------------------------------------------------------------------------------------------
And this is in Makefile.am:
+------------------------------------------------------------------------------------------
| libguile_neon_neon_la_SOURCES = $(BUILT_SOURCES) neon.c neon.h
| libguile_neon_neon_la_LDFLAGS = -version-info 0:0 -export-dynamic $(NEON_LIBS)
| libguile_neon_neon_la_LIBADD = $(LIBOBJS)
+------------------------------------------------------------------------------------------
Now my questions:
- Is this the right way to do things?
- AC_LIBOBJ passes the extra objects through $(LIBOBJS). That means that I can
only do it globally, not for a specific binary. Is there another way?
Regards
-- tomas
next reply other threads:[~2003-03-19 17:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-19 17:21 tomas [this message]
2003-03-19 17:39 ` Auto(conf|make) style questions Rob Browning
2003-03-20 7:56 ` tomas
2003-03-19 17:46 ` Mikael Djurfeldt
2003-03-19 19:26 ` Alexandre Duret-Lutz
2003-03-20 8:04 ` tomas
2003-03-21 20:17 ` Alexandre Duret-Lutz
2003-03-22 8:32 ` tomas
[not found] ` <878yvbi6ih.fsf@alice.rotty.yi.org>
2003-03-20 10:48 ` tomas
2003-04-26 8:17 ` Neil Jerram
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=20030319172104.GA6109@www \
--to=tomas@fabula.de \
--cc=rm@fabula.de \
/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).