73 lines
2.7 KiB
Plaintext
73 lines
2.7 KiB
Plaintext
# Copyright (C) 2024 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
#
|
|
# This program is free software: you can redistribute it 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.
|
|
#
|
|
# This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
AC_INIT([gnuboot],[0.1],[gnuboot@gnu.org])
|
|
AM_INIT_AUTOMAKE([foreign])
|
|
AC_CONFIG_FILES([
|
|
Makefile
|
|
resources/packages/i945-thinkpads-install-utilities/Makefile
|
|
])
|
|
|
|
AC_SUBST([GUIX_BUILD_MAX_CORES], [])
|
|
|
|
# When the Guix revision changes, the output changes, so we need to
|
|
# rebuild it. By not having the revision configurable through
|
|
# configure arguments, we make things easier because when the
|
|
# Makefiles are updated, things should be rebuilt anyway.
|
|
#
|
|
# In addition we currently use a released Guix revision and backport
|
|
# the changes we need from more recent Guix versions for several
|
|
# reasons:
|
|
#
|
|
# - Guix hosts the documentation of its latest release on its website,
|
|
# so by using the latest Guix release, we also enable GNU Boot
|
|
# contributors to have access to the corresponding Guix
|
|
# documentation without having to build and/or host it.
|
|
#
|
|
# - On most distributions, users don't need to run guix pull anymore
|
|
# to start downloading Guix 1.4.0 packages. So that can make things
|
|
# a lot faster.
|
|
|
|
AC_SUBST([GUIX_REVISION], [v1.4.0])
|
|
|
|
# --with-guix-build-max-cores
|
|
AC_ARG_WITH([guix-build-max-cores],
|
|
[AS_HELP_STRING([--with-guix-build-max-cores=N],
|
|
[Force guix build the use of up to N CPU cores for the build.
|
|
Lowering the number of cores used can help when there is not
|
|
enough RAM per core.])],
|
|
[GUIX_BUILD_MAX_CORES=$withval],
|
|
[GUIX_BUILD_MAX_CORES=0])
|
|
|
|
AC_CHECK_PROG([FOUND_GUIX], [guix], [guix])
|
|
AS_IF([test x"$FOUND_GUIX" = x""],
|
|
[AC_MSG_ERROR(
|
|
[guix was not found in PATH ($PATH)])])
|
|
|
|
# Generate a config.sh file to enable script shell to retrieve some
|
|
# settings by sourcing it.
|
|
printf '#!/usr/bin/env bash\n' > config.sh
|
|
printf '# This file is generated by configure.ac\n' >> config.sh
|
|
printf 'GUIX_REVISION=%s\n' "$GUIX_REVISION" >> config.sh
|
|
chmod +x config.sh
|
|
|
|
AC_OUTPUT
|
|
|
|
AS_ECHO(["Configuration options:"])
|
|
|
|
AS_IF([test x"$GUIX_BUILD_MAX_CORES" = x"0"],
|
|
AS_ECHO([" GUIX_BUILD_MAX_CORES: not limited."]),
|
|
AS_ECHO([" GUIX_BUILD_MAX_CORES: $GUIX_BUILD_MAX_CORES"]))
|