This is the mail archive of the guile@cygnus.com mailing list for the guile project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hi all, I think it would be important to let build-guile return really *ALL* libraries needed. For older versions of guile without build-guile or for those where it's not working I made some patches to Gnome's gnome-guile-checks.m4 a few weeks ago. When it finds a working build-guile, it uses it - otherwise it tests some libraries [FIXME: One should add -lsocket, -lnls and all the other stuff here ...]. Most important: it actually tests whether linking against guile works! This is especially important when cross-compiling and build-guile in /usr/bin - in this case configure would decide that guile does not work and leave it out. Hope it is useful ! Martin On 8 May 1998 chrislee@lavash.ius.cs.cmu.edu wrote: > To: guile@cygnus.com > Subject: build-guile [fwd: g-wrap-0.3.9 configure problem] > From: chrislee@lavash.ius.cs.cmu.edu > > > Dominique gave me permission to post his message here. I am trying to > help him set-up G-Wrap to configure correctly for his Guile > interpreter (note that he is using guile-core-980111 under Solaris). > My configure.in script uses build-guile to determine link flags (using > the configuration code Mikael Djurfeldt sent to me -- thanks!), but he > is still having some problems with ./configure missing a couple of > libraries for linking. > > Could anyone tell me whether my answers to his questions are correct? > Also, if my understanding of what happened to him is true, it looks > like build-guile may not be supplying all the necessary '-l...' > flags (though it may be due to the old version of Guile). Someone should fix this in build-guile. > > Thanks for any suggestions, > -Chris > > ps. I rarely get answers when I post to guile@cygnus.com. Is my > netiquette OK? > > [..] > > dnl Checks for libraries. > > AC_PATH_PROG(BUILD_GUILE, build-guile) > > if test "$ac_cv_prog_BUILD_GUILE" = no; then > > GUILE_LIBS='-lguile' > > else > > GUILE_LIBS=`build-guile link` > > fi > > LIBS="$GUILE_LIBS $LIBS" > > > > This is the way we builders of Guile extensions are supposed to > > figure-out how to link our executables. The purpose of these is to > > query Guile itself as to which libraries it uses for building the > > guile executable. > [...] > > In this case, we should alert the maintainers and > > make sure their configure script itself gets the libraries right so > > that it builds the proper list into the variable %guile-build-info > > (this is a variable avaiable in the interpreter which is somehow build > > during the configuration of Guile -- I haven't investigated how). > I think the problem is here! Yes, that's my oppinion, too. > > If you are using Guile 1.2 instead of a recent snapshot, build-guile > > may not exist on your system. In this case, I would edit configure.in > > to use the line > > > > GUILE_LIBS='-lguile -lsocket -lnsl -ldl' > > > > instead of > > > > GUILE_LIBS='-lguile' > > > > and run autoconf. If you don't have autoconf, just find the > > corresponding line in ./configure and make the same change. > > > > I hope this helps, > Yes ok, I am using a recent snap and I have autoconf > I understand the workarround. > thanks. ----------------------------------------------------------------- Martin Baulig - Angewandte Mathematik - Universitaet Trier baulig@castor.uni-trier.de, http://www.home-of-linux.org/ Key: 1024-bit key with ID C8178435 created 1997/01/24 ID: 67 C1 84 A0 47 F5 11 C5 5F 68 4C 84 99 05 C3 92 Finger me for public key or fetch finger.txt from the url above ------------------------------------------------------------------
dnl
dnl GNOME_CHECK_GUILE (failflag)
dnl
dnl if failflag is "fail" then GNOME_CHECK_GUILE will abort if guile is not found.
dnl
AC_DEFUN([GNOME_CHECK_GUILE],
[
saved_ldflags="$LDFLAGS"
saved_cppflags="$CPPFLAGS"
LDFLAGS="$LDFLAGS $GNOME_LIBDIR"
AC_CHECK_LIB(qthreads,main,[
QTTHREADS_LIB="-lqthreads"
],[
AC_CHECK_LIB(qt, qt_null, QTTHREADS_LIB="-lqt")
],$LIBS)
AC_SUBST(QTTHREADS_LIB)
AC_CHECK_LIB(termcap,main,TERMCAP_LIB="-ltermcap")
AC_CHECK_LIB(readline,main,READLINE_LIB="-lreadline",,$TERMCAP_LIB)
AC_SUBST(TERMCAP_LIB)
AC_SUBST(READLINE_LIB)
AC_CHECK_PROG(BUILD_GUILE, build-guile, yes, no)
if test "x$BUILD_GUILE" = "xyes"; then
AC_MSG_CHECKING(whether build-guile works)
if test x`build-guile --version >/dev/null 2>&1 || \
echo no` = xno; then
BUILD_GUILE=no
fi
AC_MSG_RESULT($BUILD_GUILE)
fi
AC_CHECK_LIB(m, sin)
if test "x$BUILD_GUILE" = "xyes"; then
AC_MSG_CHECKING(for guile libraries)
GUILE_LIBS="-L`build-guile info libdir` `build-guile link`"
AC_MSG_RESULT($GUILE_LIBS)
AC_MSG_CHECKING(for guile headers)
GUILE_INCS="-I`build-guile info includedir`"
AC_MSG_RESULT($GUILE_INCS)
else
GUILE_LIBS="$GNOME_LIBDIR"
GUILE_INCS="$GNOME_INCLUDEDIR"
AC_CHECK_LIB(rx, main, GUILE_LIBS="-lrx $GUILE_LIBS")
AC_CHECK_LIB(qt, main, GUILE_LIBS="-lqt $GUILE_LIBS")
AC_CHECK_LIB(dl, dlopen, GUILE_LIBS="-ldl $GUILE_LIBS")
GUILE_LIBS="-lguile $GUILE_LIBS $QTTHREADS_LIB $TERMCAP_LIB $READLINE_LIB"
fi
AC_SUBST(GUILE_LIBS)
AC_SUBST(GUILE_INCS)
LDFLAGS="$saved_ldflags $GUILE_LIBS"
CPPFLAGS="$saved_cppflags $GUILE_INCS"
AC_MSG_CHECKING(whether guile works)
AC_TRY_LINK([
#include <libguile.h>
#include <guile/gh.h>
],[
gh_eval_str("(newline)");
scm_boot_guile(0,NULL,NULL,NULL);
],[
ac_cv_guile_found=yes
AC_DEFINE(HAVE_GUILE)
],[
ac_cv_guile_found=no
])
AC_MSG_RESULT($ac_cv_guile_found)
if test x$ac_cv_guile_found = xno ; then
if test x$1 = xfail ; then
AC_MSG_ERROR(Can not find Guile 1.2 on this system)
else
AC_MSG_WARN(Can not find Guile 1.2 on this system)
fi
ac_cv_guile_found=no
fi
LDFLAGS="$saved_ldflags"
CPPFLAGS="$saved_cppflags"
AC_SUBST(GUILE_LIBS)
AM_CONDITIONAL(GUILE, test x$ac_cv_guile_found = xyes)
])