From ade37c96b748e5588c148e66e1420b5e4f0e8fd5 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sat, 14 Jan 2017 17:24:25 +0100 Subject: build: Support Guile 2.2. * configure.ac: Use 'GUILE_PKG' and 'GUILE_PROGS'. Remove explicit Guile version check and check for 'guild'. Honor $GUILE_EFFECTIVE_VERSION in 'moduledir'. --- configure.ac | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 5940555..efb3fe1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ ## Process this file with autoconf to produce a configure script. # Copyright © 2003, 2005, 2012, 2014 Dale Mellor # -# Copyright © 2015, 2016 Mathieu Lirzin +# Copyright © 2015, 2016, 2017 Mathieu Lirzin # # This file is part of GNU Mcron. # @@ -29,9 +29,6 @@ AC_REQUIRE_AUX_FILE([git-version-gen]) AM_INIT_AUTOMAKE([subdir-objects -Wall -Wno-override]) AM_SILENT_RULES([yes]) # enables silent rules by default -moduledir="${datarootdir}/guile/site/2.0" -AC_SUBST([moduledir]) -AC_SUBST([mcronmoduledir], ["${moduledir}/mcron"]) AC_MSG_CHECKING([whether debugging is requested]) AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], @@ -55,16 +52,22 @@ AC_PROG_AWK AC_PROG_EGREP AM_PROG_CC_C_O -PKG_CHECK_MODULES([GUILE], [guile-2.0 >= 2.0.7]) -AC_PATH_PROG([GUILE], [guile]) +# Check for Guile 2.x. development files +GUILE_PKG([2.2 2.0]) -# search guild -AC_PATH_PROG([GUILD], [guild]) -AS_IF([test -z "$ac_cv_path_GUILD"], - [AC_MSG_ERROR(['guild' program cannot be found.])]) +# Set directories for installed Guile modules +moduledir="${datarootdir}/guile/site/$GUILE_EFFECTIVE_VERSION" +AC_SUBST([moduledir]) +AC_SUBST([mcronmoduledir], ["${moduledir}/mcron"]) + +# Set Guile flags without using GUILE_FLAGS which is requiring the unused +# 'config.rpath' script. +PKG_CHECK_MODULES(GUILE, [guile-$GUILE_EFFECTIVE_VERSION]) # Checks for programs. - + +GUILE_PROGS + AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir) AC_CHECK_PROGS(SED, sed) -- cgit v1.2.3