From 61d4a096cf0302ef0142c2a8c0d7105a7461f408 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 9 Oct 2016 16:09:43 +0200 Subject: build: Change default 'guilesitedir' to PREFIX/share/guile/site/X.Y. * configure.ac: Use 'm4_pattern_forbid' for 'GUILE_' macros. Use 'GUILE_PKG' instead of 'PKG_CHECK_MODULES' to find Guile. Change default value of 'guilesitedir'. Signed-off-by: Artyom V. Poptsov --- configure.ac | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index cace99b..5441985 100644 --- a/configure.ac +++ b/configure.ac @@ -48,7 +48,6 @@ AC_ARG_WITH([guilesitedir], # Check for needed libraries # ------------------------------------------------------------------------------- -PKG_CHECK_MODULES([GUILE_2], [guile-2.0]) PKG_CHECK_MODULES([LIBSSH], [libssh >= 0.6.4]) PKG_CHECK_MODULES([LIBSSH_0_7_3], [libssh >= 0.7.3], [AC_DEFINE(HAVE_LIBSSH_0_7_3, 1, [Use libssh 0.7.3])], @@ -58,15 +57,22 @@ PKG_CHECK_MODULES([LIBSSH_0_7_3], [libssh >= 0.7.3], # ------------------------------------------------------------------------------- +dnl These macros must be provided by guile.m4. +m4_pattern_forbid([^GUILE_PKG$]) +m4_pattern_forbid([^GUILE_PROGS$]) + +dnl Currently only Guile 2.0 is supported. Use this macro so that +dnl 'GUILE_EFFECTIVE_VERSION' is defined here. +GUILE_PKG([2.0]) + GUILE_PROGS GUILE_FLAGS GUILE_SITE_DIR LT_INIT() -pkgdatadir="$datadir/$PACKAGE" if test "x$guilesitedir" = "x"; then - guilesitedir="$pkgdatadir" + guilesitedir="$datadir/guile/site/$GUILE_EFFECTIVE_VERSION" fi AC_SUBST([guilesitedir]) -- cgit v1.2.3