dnl GNU Guix --- Functional package management for GNU dnl Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> dnl Copyright © 2014 Mark H Weaver <mhw@netris.org> dnl Copyright © 2017, 2020, 2021, 2023 Efraim Flashner <efraim@flashner.co.il> dnl Copyright © 2021 Chris Marusich <cmmarusich@gmail.com> dnl dnl This file is part of GNU Guix. dnl dnl GNU Guix is free software; you can redistribute it and/or modify it dnl under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 3 of the License, or (at dnl your option) any later version. dnl dnl GNU Guix is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. dnl GUIX_SYSTEM_TYPE dnl dnl Determine the Guix host system type, and store it in the dnl `guix_system' variable. AC_DEFUN([GUIX_SYSTEM_TYPE], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_PATH_PROG([SED], [sed]) AC_ARG_WITH(system, AS_HELP_STRING([--with-system=SYSTEM], [Platform identifier (e.g., `i686-linux').]), [guix_system="$withval"], [case "$host_cpu" in i*86) machine_name="i686";; amd64) machine_name="x86_64";; arm|armv[[7-9]]*) # Here we want to exclude CPUs such as "armv6l". On ARMv7 # machines, we normally get "armv7l". However, in Guix, we # configure with --build=arm-unknown-linux-gnueabihf, leading # to just "arm", so we also have to allow it. # # TODO: If not cross-compiling, add a sanity check to make # sure this build machine has the needed features to # support executables compiled using our armhf gcc, # configured with: # --with-arch=armv7-a # --with-float=hard # --with-mode=thumb # --with-fpu=vfpv3-d16 machine_name="armhf";; *) machine_name="$host_cpu";; esac case "$host_os" in linux-gnu*) # For backward compatibility, strip the `-gnu' part. guix_system="$mac