From d6f82af4e61f17ac2c4e6291e31d64cf86dc834d Mon Sep 17 00:00:00 2001 From: David Pirotte Date: Tue, 12 Jul 2016 21:21:07 -0300 Subject: [PATCH 04/11] Updating autogen and configure * autogen.sh: (a) removing the call to configure, printing an invitation to do so instead; (b) creating build-aux/config.rpath if it does not exists: this because we use configure.ac uses the guile.m4 GUILE_FLAGS macro, among others, which needs this file, not installed anymore by modern version of automake, iiuc, and without it, autogen raises an an error. For why it's needed, see the comments in m4/guile.m4. * configure.ac: Adding a copyright; bumping prereq -> 2.69, version -> 0.2.3-dev; let's use build-aux, m4; automake -> 1.14, serial-tests; checks/looks for guile 2.2, 2.0; cleaning HAVE_GUILE_COMPILE checks, we always have access to a compiler: in the end this wil disappear, but we kept and set HAVE_GUILE_COMPILE=1 still used 'en aval'; calling GUILE_GLOBAL_SITE_DIR and GUILE_SITE_CCACHE_DIR, we'll use them in Makefile.am. --- autogen.sh | 13 ++++++++- configure.ac | 89 ++++++++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 84 insertions(+), 18 deletions(-) diff --git a/autogen.sh b/autogen.sh index 9b1b118..ef75c8e 100755 --- a/autogen.sh +++ b/autogen.sh @@ -7,5 +7,16 @@ set -e echo '@setfilename guile-library.info' > doc/guile-library.texi touch -d 'jan 23 1980' doc/guile-library.texi +# configure.ac uses the guile.m4 GUILE_FLAGS macro, among others, +# which needs build-aux/config.rpath which is not installed anymore by +# modern version of automake, and without it, this script will raise +# an error. For why it's needed, see the comments wtr in m4/guile.m4. +if [ ! -d "build-aux" ]; then + mkdir build-aux +fi +touch build-aux/config.rpath + autoreconf -vif -exec ./configure "$@" + +echo +echo "Now run ./configure --prefix=/your/prefix." diff --git a/configure.ac b/configure.ac index d694f48..710ce5a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,32 +1,87 @@ dnl -*- Autoconf -*- +dnl +dnl configuration script for Guile-Lib +dnl Process this file with autoconf to produce configure. +dnl -AC_INIT(guile-lib, 0.2.2) +define(GUILE_LIB_CONFIGURE_COPYRIGHT,[[ + +Copyright (C) 2016 David Pirotte +David Pirotte + +This file is part of Guile-Lib. + +Guile-Lib is free software: you can redistribute it, as a whole, +and/or modify it under the terms of the GNU General Public +License as published by the Free Software Foundation, either +version 3 of the License, or (at your option) any later version. + +Each Guile-Lib module contained in Guile-Lib has its own copying +conditions, specified in the comments at the beginning of the +module's source file. + +Guile-Lib is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Guile-Lib. If not, see +. + +]]) + +AC_PREREQ(2.69) + +AC_INIT( + [guile-lib], + [0.2.3-dev], + [guile-devel at gnu dor org]) + +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) + +dnl Use `serial-tests' so the output `check-guile' is not hidden +dnl (`parallel-tests' is the default in Automake 1.13.) +dnl `serial-tests' was introduced in Automake 1.12. +AM_INIT_AUTOMAKE([1.14 gnu -Wall -Wno-portability -Wno-syntax \ + color-tests serial-tests foreign]) +AM_MAINTAINER_MODE([enable]) +AM_SILENT_RULES([yes]) + +AC_COPYRIGHT(GUILE_LIB_CONFIGURE_COPYRIGHT) AC_CONFIG_SRCDIR(src/md5.scm) -AM_INIT_AUTOMAKE([1.11 gnu check-news color-tests -Wall -Wno-portability]) AC_SUBST(ACLOCAL_FLAGS,$ACLOCAL_FLAGS) -GUILE_PROGS +GUILE_PKG([2.2 2.0]) +dnl must be changed to 2.0.12 before to release it needs recent +dnl stable-2.0 texinfo patches so 'make check' pass. I'm using git so +dnl I have all these patches locally, however 2.0.11 distro would +dnl fail. +GUILE_PROGS([2.0.11]) +GUILE_SITE_DIR +GUILE_GLOBAL_SITE_DIR +GUILE_SITE_CCACHE_DIR GUILE_FLAGS -if $GUILE_TOOLS | grep compile 2>&1 >/dev/null; then - GUILE_COMPILE="$GUILE_TOOLS compile" - HAVE_GUILE_COMPILE=1 -else - GUILE_COMPILE="" - HAVE_GUILE_COMPILE=0 -fi - +dnl this should disappear +dnl but for now we'll keep it, it's used 'en aval' +HAVE_GUILE_COMPILE=1 +GUILE_COMPILE="guild compile" AC_SUBST(GUILE_COMPILE) AM_CONDITIONAL(HAVE_GUILE_COMPILE, test "$HAVE_GUILE_COMPILE" = 1) +AC_CONFIG_FILES( + [dev-environ], + [chmod +x dev-environ]) + AC_CONFIG_FILES([ -Makefile -src/Makefile -doc/Makefile -examples/Makefile -unit-tests/Makefile + Makefile + src/Makefile + doc/Makefile + examples/Makefile + unit-tests/Makefile ]) -AC_CONFIG_FILES([dev-environ], [chmod +x dev-environ]) AC_OUTPUT -- 2.8.1