scheme-dql/configure.ac
2025-06-27 13:20:24 +02:00

115 lines
3.7 KiB
Text

define(SCHEME_DQL_CONFIGURE_COPYRIGHT, [[
Copyright (C) 2025 Cor Legemaat <cor@cor.za.net>
All Rights Reserved
This file is part of scheme-dql: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published by the
Free Software Foundation, version 3 of the License.
scheme-dql 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
<Project-name>. If not, see <https://www.gnu.org/licenses/>.
]])
m4_define([version_major], [0])
m4_define([version_minor], [0])
m4_define([version_revision], [0])
AC_PACKAGE_URL([http://www.cor.za.net/code/scheme-dql])
AC_INIT(scheme-dql,
[version_major.version_minor.version_revision],
[mailto:cor@cor.za.net],
[],
[http://www.cor.za.net/code/scheme-dql])
AC_COPYRIGHT(SCHEME_DQL_CONFIGURE_COPYRIGHT)
AM_INIT_AUTOMAKE([1.16])
AC_CONFIG_MACRO_DIR([m4])
dnl ****************************************************************************
dnl Add version detail to config.h and makefile.am
dnl ****************************************************************************
AC_DEFINE([VERSION_MAJOR], [version_major], [Major section of version])
AC_DEFINE([VERSION_MINOR], [version_minor], [Minor section of version])
AC_DEFINE([VERSION_REVISION], [version_revision], [Revision section of version])
dnl Push version detail to makefile.am
VERSION=[version_major.version_minor.version_revision]
AC_SUBST(VERSION,[version_major.version_minor.version_revision])
VERSION_MAJOR=[version_major]
AC_SUBST(VERSION_MAJOR,[version_major])
VERSION_MINOR=[version_minor]
AC_SUBST(VERSION_MINOR,[version_minor])
VERSION_REVISION=[version_revision]
AC_SUBST(VERSION_REVISION,[version_revision])
dnl ****************************************************************************
dnl Check for the required guile dependency's.
dnl ****************************************************************************
m4_pattern_forbid([^GUILE_PKG$])
m4_pattern_forbid([^GUILE_PROGS$])
GUILE_PKG([3.0 2.0 2.2])
GUILE_PROGS
GUILE_FLAGS
GUILE_SITE_DIR
GUILE_MODULE_REQUIRED([srfi srfi-1])
GUILE_MODULE_REQUIRED([ice-9 pretty-print])
GUILE_MODULE_REQUIRED([ice-9 optargs])
GUILE_MODULE_REQUIRED([oop goops])
dnl Guile prefix and libdir.
GUILE_PREFIX=`$PKG_CONFIG --print-errors --variable=prefix guile-$GUILE_EFFECTIVE_VERSION`
GUILE_LIBDIR=`$PKG_CONFIG --print-errors --variable=libdir guile-$GUILE_EFFECTIVE_VERSION`
AC_SUBST(GUILE_PREFIX)
AC_SUBST(GUILE_LIBDIR)
if test "$cross_compiling" != no; then
GUILE_TARGET="--target=$host_alias"
AC_SUBST([GUILE_TARGET])
fi
dnl ***************************************************************************
dnl Internationalization
dnl ***************************************************************************
AM_GNU_GETTEXT_REQUIRE_VERSION(0.20)
dnl AM_GNU_GETTEXT_VERSION(0.20)
AM_GNU_GETTEXT([external])
dnl ***************************************************************************
AM_EXTRA_RECURSIVE_TARGETS([doc])
AC_CONFIG_FILES([Makefile
po/Makefile.in
src/Makefile
doc/Makefile])
AC_CONFIG_COMMANDS([timestamp], [date >timestamp])
AC_OUTPUT
dnl This is just for printing $libdir below.
LIBDIR=`eval echo $libdir`
LIBDIR=`eval echo $LIBDIR`
AC_SUBST([LIBDIR])
echo
echo "*** $PACKAGE $VERSION has been successfully configured ***"
echo
echo "$PACKAGE is using:"
echo
echo " --prefix=$prefix --libdir=$LIBDIR"
echo
echo "If you want to install in Guile system's directory re-run with:"
echo
echo " --prefix=$GUILE_PREFIX --libdir=$GUILE_LIBDIR"
echo
# End the configure script.