mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 14:30:34 +02:00
perform gmp/unistring compile checks with AC_LIB_HAVE_LINKFLAGS
* configure.ac: Rework gmp and unistring checks to use AC_LIB_HAVE_LINKFLAGS, so that the compilation checks run with the right -L/-l flags. * libguile/Makefile.am (libguile_la_LIBADD): Adapt to need to add $(LIBGMP) and $(LIBUNISTRING) here. Hopefully this solves http://article.gmane.org/gmane.lisp.guile.bugs/4288.
This commit is contained in:
parent
45cc8a3877
commit
f4863880f5
2 changed files with 11 additions and 14 deletions
23
configure.ac
23
configure.ac
|
@ -827,22 +827,19 @@ fi
|
|||
|
||||
|
||||
dnl GMP tests
|
||||
AC_LIB_LINKFLAGS(gmp)
|
||||
AC_CHECK_LIB([gmp], [__gmpz_init], ,
|
||||
[AC_MSG_ERROR([GNU MP not found, see README])])
|
||||
|
||||
# mpz_import is a macro so we need to include <gmp.h>
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gmp.h>]],
|
||||
[[mpz_import (0, 0, 0, 0, 0, 0, 0); ]])],
|
||||
AC_LIB_HAVE_LINKFLAGS(gmp,
|
||||
[],
|
||||
[AC_MSG_ERROR([At least GNU MP 4.1 is required, see README])])
|
||||
[#include <gmp.h>],
|
||||
[mpz_import (0, 0, 0, 0, 0, 0, 0);],
|
||||
AC_MSG_ERROR([GNU MP 4.1 or greater not found, see README]))
|
||||
|
||||
dnl GNU libunistring tests.
|
||||
if test "x$LTLIBUNISTRING" != "x"; then
|
||||
LIBS="$LTLIBUNISTRING $LIBS"
|
||||
else
|
||||
AC_MSG_ERROR([GNU libunistring is required, please install it.])
|
||||
fi
|
||||
AC_LIB_HAVE_LINKFLAGS(unistring,
|
||||
[],
|
||||
[#include <unistr.h>],
|
||||
[u8_check ("foo", 3)]
|
||||
AC_MSG_ERROR([GNU libunistring not found, see README]))
|
||||
|
||||
|
||||
dnl i18n tests
|
||||
#AC_CHECK_HEADERS([libintl.h])
|
||||
|
|
|
@ -220,7 +220,7 @@ noinst_HEADERS = convert.i.c \
|
|||
noinst_HEADERS += vm-engine.c vm-i-system.c vm-i-scheme.c vm-i-loader.c
|
||||
|
||||
libguile_la_DEPENDENCIES = @LIBLOBJS@
|
||||
libguile_la_LIBADD = @LIBLOBJS@ $(gnulib_library)
|
||||
libguile_la_LIBADD = @LIBLOBJS@ $(gnulib_library) $(LTLIBGMP) $(LTLIBUNISTRING)
|
||||
libguile_la_LDFLAGS = @LTLIBINTL@ -version-info @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@ -export-dynamic -no-undefined
|
||||
|
||||
# These are headers visible as <guile/mumble.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue