2010-08-17 14:11:43 +00:00
# -*- autoconf -*-
2002-12-27 08:53:07 +00:00
# Process this file with autoconf to produce a configure script.
2010-01-01 20:32:30 +00:00
# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
2002-12-27 08:53:07 +00:00
#
# This configure.ac is free software; the author
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
dnl This configure script is complicated, because GRUB needs to deal
dnl with three potentially different types:
dnl
dnl build -- the environment for building GRUB
dnl host -- the environment for running utilities
dnl target -- the environment for running GRUB
dnl
dnl In addition, GRUB needs to deal with a platform specification
dnl which specifies the system running GRUB, such as firmware.
dnl This is necessary because the target type in autoconf does not
dnl describe such a system very well.
dnl
dnl The current strategy is to use variables with no prefix (such as
2014-01-18 15:50:54 +00:00
dnl CC, CFLAGS, etc.) for the host type, variables with prefix "BUILD_"
dnl (such as BUILD_CC, BUILD_CFLAGS, etc.) for the build type and variables
dnl with the prefix "TARGET_" (such as TARGET_CC, TARGET_CFLAGS, etc.) are
dnl used for the target type. See INSTALL for full list of variables.
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
2017-05-03 09:55:52 +00:00
AC_INIT([GRUB],[2.03],[bug-grub@gnu.org])
2002-12-27 08:53:07 +00:00
2010-09-20 10:35:33 +00:00
AC_CONFIG_AUX_DIR([build-aux])
2010-08-17 14:11:43 +00:00
# We don't want -g -O2 by default in CFLAGS
: ${CFLAGS=""}
2002-12-27 08:53:07 +00:00
2014-01-18 16:41:24 +00:00
# Checks for build, host and target systems.
AC_CANONICAL_BUILD
2002-12-27 08:53:07 +00:00
AC_CANONICAL_HOST
2013-11-03 11:48:13 +00:00
save_program_prefix="${program_prefix}"
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
AC_CANONICAL_TARGET
2013-11-03 11:48:13 +00:00
program_prefix="${save_program_prefix}"
2002-12-27 08:53:07 +00:00
2019-02-27 10:03:55 +00:00
AM_INIT_AUTOMAKE([1.11])
AC_PREREQ(2.63)
2010-08-17 13:33:22 +00:00
AC_CONFIG_SRCDIR([include/grub/dl.h])
2010-09-19 20:22:43 +00:00
AC_CONFIG_HEADER([config-util.h])
2009-01-13 16:34:26 +00:00
2018-01-30 21:59:09 +00:00
# Explicitly check for pkg-config early on, since otherwise conditional
# calls are problematic.
PKG_PROG_PKG_CONFIG
2007-04-10 21:38:26 +00:00
# Program name transformations
AC_ARG_PROGRAM
2012-12-28 06:57:17 +00:00
grub_TRANSFORM([grub-bios-setup])
grub_TRANSFORM([grub-editenv])
grub_TRANSFORM([grub-install])
grub_TRANSFORM([grub-mkconfig])
grub_TRANSFORM([grub-mkfont])
grub_TRANSFORM([grub-mkimage])
2013-04-12 22:38:04 +00:00
grub_TRANSFORM([grub-glue-efi])
2012-12-28 06:57:17 +00:00
grub_TRANSFORM([grub-mklayout])
grub_TRANSFORM([grub-mkpasswd-pbkdf2])
grub_TRANSFORM([grub-mkrelpath])
grub_TRANSFORM([grub-mkrescue])
grub_TRANSFORM([grub-probe])
grub_TRANSFORM([grub-reboot])
grub_TRANSFORM([grub-script-check])
grub_TRANSFORM([grub-set-default])
grub_TRANSFORM([grub-sparc64-setup])
2013-04-11 21:15:26 +00:00
grub_TRANSFORM([grub-render-label])
2013-12-17 13:39:48 +00:00
grub_TRANSFORM([grub-file])
2007-04-10 21:38:26 +00:00
2009-12-29 14:04:18 +00:00
# Optimization flag. Allow user to override.
if test "x$TARGET_CFLAGS" = x; then
TARGET_CFLAGS="$TARGET_CFLAGS -Os"
fi
2010-08-17 14:11:43 +00:00
# Default HOST_CPPFLAGS
HOST_CPPFLAGS="$HOST_CPPFLAGS -Wall -W"
HOST_CPPFLAGS="$HOST_CPPFLAGS -DGRUB_UTIL=1"
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -Wall -W"
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
case "$target_cpu" in
2009-06-29 12:19:08 +00:00
i[[3456]]86) target_cpu=i386 ;;
2010-03-04 21:33:49 +00:00
amd64) target_cpu=x86_64 ;;
2009-06-29 12:19:08 +00:00
sparc) target_cpu=sparc64 ;;
2009-11-21 16:33:23 +00:00
mipsel|mips64el)
2014-09-07 19:47:43 +00:00
target_cpu=mipsel
machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_CPU_MIPSEL=1"
2009-10-18 13:06:47 +00:00
;;
2009-11-21 16:33:23 +00:00
mips|mips64)
2014-09-07 19:47:43 +00:00
target_cpu=mips
machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_CPU_MIPS=1"
2009-10-18 13:06:47 +00:00
;;
2013-04-07 00:41:07 +00:00
arm*)
2014-09-07 19:47:43 +00:00
target_cpu=arm
2013-04-07 00:41:07 +00:00
;;
2013-11-16 19:52:55 +00:00
aarch64*)
2014-09-07 19:47:43 +00:00
target_cpu=arm64
2013-11-16 19:52:55 +00:00
;;
2019-02-12 10:31:07 +00:00
riscv32*)
target_cpu=riscv32
;;
riscv64*)
target_cpu=riscv64
;;
2002-12-27 08:53:07 +00:00
esac
2006-05-08 19:29:10 +00:00
# Specify the platform (such as firmware).
AC_ARG_WITH([platform],
AS_HELP_STRING([--with-platform=PLATFORM],
2006-05-09 00:05:49 +00:00
[select the host platform [[guessed]]]))
2006-05-08 19:29:10 +00:00
# Guess the platform if not specified.
if test "x$with_platform" = x; then
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
case "$target_cpu"-"$target_vendor" in
2006-05-08 19:29:10 +00:00
i386-apple) platform=efi ;;
i386-*) platform=pc ;;
2008-07-17 18:13:57 +00:00
x86_64-apple) platform=efi ;;
2008-07-17 15:31:16 +00:00
x86_64-*) platform=pc ;;
2006-05-08 19:29:10 +00:00
powerpc-*) platform=ieee1275 ;;
2008-07-17 18:13:57 +00:00
powerpc64-*) platform=ieee1275 ;;
2015-07-21 23:54:59 +00:00
powerpc64le-*) platform=ieee1275 ;;
2006-05-08 19:29:10 +00:00
sparc64-*) platform=ieee1275 ;;
2011-05-17 20:48:20 +00:00
mipsel-*) platform=loongson ;;
mips-*) platform=arc ;;
2010-01-18 15:02:21 +00:00
ia64-*) platform=efi ;;
2013-04-07 00:41:07 +00:00
arm-*) platform=uboot ;;
2013-11-16 19:52:55 +00:00
arm64-*) platform=efi ;;
2019-02-12 10:31:07 +00:00
riscv32-*) platform=efi ;;
riscv64-*) platform=efi ;;
2014-09-23 11:06:30 +00:00
*)
AC_MSG_WARN([unsupported CPU: "$target_cpu" - only building utilities])
platform=none
;;
2006-05-08 19:29:10 +00:00
esac
else
platform="$with_platform"
fi
2011-01-07 23:44:38 +00:00
case "$target_cpu"-"$platform" in
x86_64-efi) ;;
x86_64-emu) ;;
2013-11-09 20:29:11 +00:00
x86_64-xen) ;;
2014-09-23 11:06:30 +00:00
x86_64-none) ;;
2011-01-07 23:44:38 +00:00
x86_64-*) target_cpu=i386 ;;
powerpc64-ieee1275) target_cpu=powerpc ;;
2015-07-21 23:54:59 +00:00
powerpc64le-ieee1275) target_cpu=powerpc ;;
2011-01-07 23:44:38 +00:00
esac
2008-07-17 09:50:26 +00:00
2008-07-17 18:13:57 +00:00
# Check if the platform is supported, make final adjustments.
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
case "$target_cpu"-"$platform" in
2006-05-08 19:29:10 +00:00
i386-efi) ;;
2008-07-18 03:21:47 +00:00
x86_64-efi) ;;
2013-11-09 20:29:11 +00:00
i386-xen) ;;
2018-12-07 12:11:48 +00:00
i386-xen_pvh) ;;
2013-11-09 20:29:11 +00:00
x86_64-xen) ;;
2006-05-08 19:29:10 +00:00
i386-pc) ;;
2010-05-01 12:06:53 +00:00
i386-multiboot) ;;
2008-07-17 15:05:12 +00:00
i386-coreboot) ;;
2008-07-17 18:13:57 +00:00
i386-linuxbios) platform=coreboot ;;
2008-01-15 20:05:44 +00:00
i386-ieee1275) ;;
2009-06-27 11:18:10 +00:00
i386-qemu) ;;
2006-05-08 19:29:10 +00:00
powerpc-ieee1275) ;;
sparc64-ieee1275) ;;
2010-01-18 14:17:47 +00:00
ia64-efi) ;;
2011-01-14 16:37:11 +00:00
mips-qemu_mips) ;;
2011-05-17 12:02:18 +00:00
mips-qemu-mips) platform=qemu_mips;;
2011-05-13 14:36:05 +00:00
mips-arc) ;;
2013-04-25 20:42:35 +00:00
mipsel-arc) ;;
2011-05-17 20:48:20 +00:00
mipsel-qemu_mips) ;;
mipsel-qemu-mips) platform=qemu_mips;;
mipsel-yeeloong) platform=loongson ;;
mipsel-fuloong) platform=loongson ;;
mipsel-loongson) ;;
2013-04-07 00:41:07 +00:00
arm-uboot) ;;
2017-05-08 18:53:28 +00:00
arm-coreboot) ;;
2013-04-07 00:41:07 +00:00
arm-efi) ;;
2013-11-16 19:52:55 +00:00
arm64-efi) ;;
2019-02-12 10:31:07 +00:00
riscv32-efi) ;;
riscv64-efi) ;;
2009-11-23 15:31:54 +00:00
*-emu) ;;
2014-09-23 11:06:30 +00:00
*-none) ;;
2008-07-17 18:13:57 +00:00
*) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;;
2002-12-27 08:53:07 +00:00
esac
2013-11-02 23:24:57 +00:00
if test x$platform != xemu ; then
2013-11-02 21:46:01 +00:00
case "$target_cpu" in
i386 | powerpc) target_m32=1 ;;
x86_64 | sparc64) target_m64=1 ;;
esac
fi
2008-07-18 03:21:47 +00:00
2013-12-09 23:05:28 +00:00
if test x"$target_cpu-$platform" = xsparc64-emu ; then
2014-09-07 19:47:43 +00:00
target_m64=1
2013-12-09 23:05:28 +00:00
fi
2013-08-21 23:56:28 +00:00
case "$target_os" in
2013-08-22 15:02:47 +00:00
windows* | mingw32*) target_os=cygwin ;;
2013-08-21 23:56:28 +00:00
esac
2009-03-04 22:00:41 +00:00
# This normalizes the names, and creates a new variable ("host_kernel")
# while at it, since the mapping is not always 1:1 (e.g. different OSes
# using the same kernel type).
case "$host_os" in
gnu*) host_kernel=hurd ;;
linux*) host_kernel=linux ;;
2009-10-26 00:41:54 +00:00
freebsd* | kfreebsd*-gnu) host_kernel=kfreebsd ;;
2010-04-10 15:07:33 +00:00
netbsd*) host_kernel=netbsd ;;
2011-11-08 11:38:30 +00:00
solaris*) host_kernel=illumos ;;
2012-05-29 11:56:21 +00:00
darwin*) host_kernel=xnu ;;
2013-09-23 09:21:09 +00:00
cygwin | windows* | mingw32*) host_kernel=windows ;;
2009-03-04 22:00:41 +00:00
esac
2013-11-16 19:21:16 +00:00
case "$host_os" in
2017-08-14 14:27:53 +00:00
cygwin) have_exec=y ;;
windows* | mingw32*) have_exec=n ;;
2013-11-16 19:21:16 +00:00
aros*) have_exec=n ;;
*) have_exec=y;;
esac
2009-11-23 15:31:54 +00:00
case "$platform" in
2010-08-21 11:41:40 +00:00
coreboot) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_COREBOOT=1" ;;
multiboot) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MULTIBOOT=1" ;;
efi) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_EFI=1" ;;
2013-11-09 20:29:11 +00:00
xen) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_XEN=1" ;;
2018-12-07 12:11:48 +00:00
xen_pvh) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_XEN_PVH=1" ;;
2010-08-21 11:41:40 +00:00
ieee1275) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_IEEE1275=1" ;;
2013-04-07 00:41:07 +00:00
uboot) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_UBOOT=1" ;;
2010-08-21 11:41:40 +00:00
qemu) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_QEMU=1" ;;
pc) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_PCBIOS=1" ;;
emu) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_EMU=1" ;;
2013-12-23 16:24:52 +00:00
loongson) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_LOONGSON=1" ;;
qemu_mips) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_QEMU_MIPS=1" ;;
2011-05-17 12:02:18 +00:00
arc) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_ARC=1" ;;
2009-11-23 15:31:54 +00:00
esac
2011-05-17 20:48:20 +00:00
if test x${target_cpu} = xmipsel ; then
machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo mips_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
else
2013-12-23 16:24:52 +00:00
machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo ${target_cpu}_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
2011-05-17 20:48:20 +00:00
fi
2010-02-12 19:08:56 +00:00
2013-04-25 20:42:35 +00:00
case "${target_cpu}-$platform" in
mips-arc)
TARGET_LINK_ADDR=0x88200000
TARGET_DECOMPRESSOR_LINK_ADDR=0x88100000
;;
mipsel-arc)
TARGET_LINK_ADDR=0x80700000
TARGET_DECOMPRESSOR_LINK_ADDR=0x80600000
;;
2013-04-26 09:26:08 +00:00
mips*-qemu_mips | mips*-loongson)
2013-04-25 20:42:35 +00:00
TARGET_DECOMPRESSOR_LINK_ADDR=0x80100000
;;
esac
AC_SUBST(TARGET_LINK_ADDR)
AC_SUBST(TARGET_DECOMPRESSOR_LINK_ADDR)
2010-08-21 11:41:40 +00:00
TARGET_CPPFLAGS="$TARGET_CPPFLAGS $machine_CPPFLAGS"
2009-11-23 15:31:54 +00:00
2009-02-08 19:59:32 +00:00
AC_SUBST(host_cpu)
AC_SUBST(host_os)
2009-03-04 22:00:41 +00:00
AC_SUBST(host_kernel)
2008-08-29 19:55:23 +00:00
2012-02-27 18:10:02 +00:00
AC_SUBST(target_cpu)
AC_SUBST(platform)
2010-09-08 15:19:27 +00:00
# Define default variables
2012-02-27 10:34:31 +00:00
have_with_bootdir=n
AC_ARG_WITH([bootdir],
AS_HELP_STRING([--with-bootdir=DIR],
[set the name of /boot directory [[guessed]]]),
[have_with_bootdir=y],
[have_with_bootdir=n])
if test x$have_with_bootdir = xy; then
bootdirname="$with_bootdir"
else
case "$host_os" in
netbsd* | openbsd*)
2010-09-08 15:19:27 +00:00
# Because /boot is used for the boot block in NetBSD and OpenBSD,
2012-02-27 10:34:31 +00:00
bootdirname='' ;;
*) bootdirname='boot' ;;
esac
fi
2010-09-08 15:19:27 +00:00
AC_SUBST(bootdirname)
2010-09-21 09:42:30 +00:00
AC_DEFINE_UNQUOTED(GRUB_BOOT_DIR_NAME, "$bootdirname",
2018-08-01 16:28:43 +00:00
[Default boot directory name])
2010-09-08 15:19:27 +00:00
2012-02-27 10:34:31 +00:00
AC_ARG_WITH([grubdir],
AS_HELP_STRING([--with-grubdir=DIR],
[set the name of grub directory [[guessed]]]),
[grubdirname="$with_grubdir"],
[grubdirname="$PACKAGE"])
2010-09-08 15:19:27 +00:00
AC_SUBST(grubdirname)
2010-09-21 09:42:30 +00:00
AC_DEFINE_UNQUOTED(GRUB_DIR_NAME, "$grubdirname",
[Default grub directory name])
2010-09-08 15:19:27 +00:00
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
#
# Checks for build programs.
#
2006-01-03 17:58:02 +00:00
2006-05-30 00:32:29 +00:00
# Although cmp is listed in the GNU Coding Standards as a command which
# can used directly, OpenBSD lacks cmp in the default installation.
AC_CHECK_PROGS([CMP], [cmp])
if test "x$CMP" = x; then
AC_MSG_ERROR([cmp is not found])
fi
2006-01-03 17:58:02 +00:00
AC_CHECK_PROGS([YACC], [bison])
2005-11-26 23:40:24 +00:00
if test "x$YACC" = x; then
2006-05-30 00:32:29 +00:00
AC_MSG_ERROR([bison is not found])
2005-11-26 23:40:24 +00:00
fi
2010-08-17 14:11:43 +00:00
AC_PROG_RANLIB
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
AC_PROG_INSTALL
AC_PROG_AWK
2010-04-05 15:38:30 +00:00
AC_PROG_LEX
2010-08-17 14:11:43 +00:00
AC_PROG_YACC
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
AC_PROG_MAKE_SET
2009-09-23 17:18:06 +00:00
AC_PROG_MKDIR_P
2010-09-24 08:48:27 +00:00
AC_PROG_LN_S
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
2010-05-28 17:13:48 +00:00
if test "x$LEX" = "x:"; then
2010-04-05 15:38:30 +00:00
AC_MSG_ERROR([flex is not found])
else
2015-11-27 16:42:23 +00:00
version=`$LEX --version | $AWK '{ split($2,x,"."); print x[[1]]*10000+x[[2]]*100+x[[3]]; }'`
2010-04-05 16:17:19 +00:00
if test -n "$version" -a "$version" -ge 20535; then
2010-04-05 15:38:30 +00:00
:
else
AC_MSG_ERROR([flex is too old. GRUB requires 2.5.35 or above])
fi
fi
2008-02-09 12:31:11 +00:00
# These are not a "must".
2011-01-11 23:49:27 +00:00
AC_PATH_PROGS(MAKEINFO, makeinfo true)
2002-12-27 08:53:07 +00:00
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
#
# Checks for host programs.
#
AC_PROG_CC
2010-09-20 10:35:33 +00:00
gl_EARLY
2013-05-07 09:30:48 +00:00
AC_PROG_CXX
2010-08-17 14:11:43 +00:00
AM_PROG_CC_C_O
AM_PROG_AS
python: Use AM_PATH_PYTHON to determine interpreter for gentpl.py
gentpl.py is python2/3-agnostic, but there's no way to cause it
to be run with any interpreter other than 'python', it's just
hard-coded into Makefile.common that way. Adjust that to use
AM_PATH_PYTHON (provided by automake) to find an interpreter
and run gentpl.py with that instead. This makes grub buildable
when `python` does not exist (but rather `python3` or `python2`
or `python2.7`, etc.) Minimum version is set to 2.6 as this is
the first version with `__future__.print_function` available.
Note, AM_PATH_PYTHON respects the PYTHON environment variable
and will treat its value as the *only* candidate for a valid
interpreter if it is set - when PYTHON is set, AM_PATH_PYTHON
will not try to find any alternative interpreter, it will only
check whether the interpreter set as the value of PYTHON meets
the requirements and use it if so or fail if not. This means
that when using grub's `autogen.sh`, as it too uses the value
of the PYTHON environment variable (and if it is not set, just
sets it to 'python') you cannot rely on AM_PATH_PYTHON
interpreter discovery. If your desired Python interpreter is
not just 'python', you must set the PYTHON environment variable,
e.g. 'PYTHON=/usr/local/bin/python3 ./autogen.sh'. The specified
interpreter will then be used both by autogen.sh itself and by
the autotools-driven build scripts.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2018-07-04 16:55:52 +00:00
AM_PATH_PYTHON([2.6])
2010-08-17 14:11:43 +00:00
2002-12-27 08:53:07 +00:00
# Must be GCC.
test "x$GCC" = xyes || AC_MSG_ERROR([GCC is required])
2013-05-07 09:30:48 +00:00
AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
2006-06-13 22:50:01 +00:00
AC_GNU_SOURCE
2010-01-01 20:32:30 +00:00
AM_GNU_GETTEXT([external])
2019-02-27 10:03:55 +00:00
AM_GNU_GETTEXT_VERSION([0.18.3])
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
AC_SYS_LARGEFILE
# Identify characteristics of the host architecture.
2013-08-22 15:00:59 +00:00
unset ac_cv_c_bigendian
2013-12-09 23:05:28 +00:00
if test x"$target_cpu-$platform" = xsparc64-emu ; then
CFLAGS="$CFLAGS -m64"
HOST_CFLAGS="$HOST_CFLAGS -m64"
fi
2015-01-26 08:35:44 +00:00
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
HOST_CPPFLAGS="$HOST_CPPFLAGS -D_FILE_OFFSET_BITS=64"
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
AC_C_BIGENDIAN
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(long)
2013-09-23 09:21:09 +00:00
case "$host_os" in
cygwin | windows* | mingw32*)
HOST_CPPFLAGS="$HOST_CPPFLAGS -DUNICODE=1 -D_WIN32_WINNT=0x0500"
CPPFLAGS="$CPPFLAGS -DUNICODE=1 -D_WIN32_WINNT=0x0500"
AC_CHECK_SIZEOF(TCHAR,,[#include <windows.h>])
;;
esac
2015-01-22 18:54:36 +00:00
case "$host_os" in
cygwin | windows* | mingw32* | aros*)
;;
*)
AC_CHECK_SIZEOF(off_t)
2017-01-23 17:21:05 +00:00
if test x"$ac_cv_sizeof_off_t" != x8 ; then
AC_CHECK_SIZEOF(off64_t)
test x"$ac_cv_sizeof_off64_t" = x8 || AC_MSG_ERROR([Large file support is required])
fi;;
2015-01-22 18:54:36 +00:00
esac
2012-02-21 14:26:16 +00:00
if test x$USE_NLS = xno; then
HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
fi
2009-09-11 14:17:35 +00:00
if test "x$cross_compiling" = xyes; then
AC_MSG_WARN([cannot generate manual pages while cross compiling])
else
AC_PATH_PROG(HELP2MAN, help2man)
fi
2010-07-31 10:22:01 +00:00
# Check for functions and headers.
2013-05-10 18:57:32 +00:00
AC_CHECK_FUNCS(posix_memalign memalign getextmntent)
2016-04-19 18:27:22 +00:00
AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h limits.h)
2016-12-22 19:48:25 +00:00
# glibc 2.25 still includes sys/sysmacros.h in sys/types.h but emits deprecation
# warning which causes compilation failure later with -Werror. So use -Werror here
# as well to force proper sys/sysmacros.h detection.
SAVED_CFLAGS="$CFLAGS"
CFLAGS="$HOST_CFLAGS -Werror"
2016-04-19 18:27:22 +00:00
AC_HEADER_MAJOR
2016-12-22 19:48:25 +00:00
CFLAGS="$SAVED_CFLAGS"
2009-11-08 23:01:34 +00:00
2010-09-10 12:02:54 +00:00
AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$ac_includes_default
#include <sys/param.h>
#include <sys/mount.h>])
AC_CHECK_MEMBERS([struct statfs.f_mntfromname],,,[$ac_includes_default
#include <sys/param.h>
#include <sys/mount.h>])
2010-04-10 15:07:33 +00:00
# For opendisk() and getrawpartition() on NetBSD.
# Used in util/deviceiter.c and in util/hostdisk.c.
AC_CHECK_HEADER([util.h], [
AC_CHECK_LIB([util], [opendisk], [
LIBUTIL="-lutil"
AC_DEFINE(HAVE_OPENDISK, 1, [Define if opendisk() in -lutil can be used])
])
AC_CHECK_LIB([util], [getrawpartition], [
LIBUTIL="-lutil"
AC_DEFINE(HAVE_GETRAWPARTITION, 1, [Define if getrawpartition() in -lutil can be used])
])
])
AC_SUBST([LIBUTIL])
2013-03-03 14:57:30 +00:00
AC_CACHE_CHECK([whether -Wtrampolines work], [grub_cv_host_cc_wtrampolines], [
2013-01-03 20:34:34 +00:00
SAVED_CFLAGS="$CFLAGS"
2013-11-07 02:31:24 +00:00
CFLAGS="$HOST_CFLAGS -Wtrampolines -Werror"
2013-01-03 20:34:34 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
int va_arg_func (int fixed, va_list args);]], [[]])],
2013-03-03 14:57:30 +00:00
[grub_cv_host_cc_wtrampolines=yes],
[grub_cv_host_cc_wtrampolines=no])
2013-01-03 20:34:34 +00:00
CFLAGS="$SAVED_CFLAGS"
])
2013-03-03 14:57:30 +00:00
if test x"$grub_host_cv_cc_wtrampolines" = xyes ; then
HOST_CFLAGS="$HOST_CFLAGS -Wtrampolines"
2013-01-03 20:34:34 +00:00
fi
2010-08-17 14:11:43 +00:00
#
# Check for host and build compilers.
#
HOST_CC=$CC
2013-08-14 08:54:20 +00:00
AC_CHECK_PROGS(BUILD_CC, [gcc egcs cc])
test -z "$BUILD_CC" && AC_MSG_ERROR([none of gcc, egcs and cc is found. set BUILD_CC manually.])
2013-08-22 16:56:00 +00:00
BUILD_CPP="$BUILD_CC -E"
2010-08-17 14:11:43 +00:00
2013-10-19 00:20:21 +00:00
case "$build_os" in
haiku*) BUILD_LIBM= ;;
*) BUILD_LIBM=-lm ;;
esac
2014-01-18 16:41:24 +00:00
dnl FIXME proper test seems to require too deep dive into Autoconf internals.
dnl For now just list known platforms that we support.
case "$build_os" in
cygwin*|mingw32*|mingw64*) BUILD_EXEEXT=.exe ;;
*) BUILD_EXEEXT= ;;
esac
AC_SUBST(BUILD_EXEEXT)
2017-01-22 17:22:34 +00:00
# In some build environments like termux /bin/sh is not a valid
# shebang. Use $SHELL instead if it's executable and /bin/sh isn't
BUILD_SHEBANG=/bin/sh
for she in /bin/sh "$SHELL"; do
if test -x "$she" ; then
BUILD_SHEBANG="$she"
fi
done
AC_SUBST(BUILD_SHEBANG)
2010-09-20 10:35:33 +00:00
# For gnulib.
gl_INIT
2013-12-21 12:53:42 +00:00
WARN_FLAGS="-Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes"
2013-12-21 14:28:28 +00:00
EXTRA_WARN_FLAGS="-Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2"
2013-12-04 09:08:57 +00:00
HOST_CFLAGS="$HOST_CFLAGS $WARN_FLAGS -Wcast-align"
AC_CACHE_CHECK([which extra warnings work], [grub_cv_cc_w_extra_flags], [
SAVED_CFLAGS="$CFLAGS"
grub_cv_cc_w_extra_flags=
for x in $EXTRA_WARN_FLAGS; do
CFLAGS="$HOST_CFLAGS $x -Werror"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [flag=1], [flag=0])
if test x$flag = x1 ; then
grub_cv_cc_w_extra_flags="$grub_cv_cc_w_extra_flags $x"
fi
done
CFLAGS="$SAVED_CFLAGS"
])
HOST_CFLAGS="$HOST_CFLAGS $grub_cv_cc_w_extra_flags"
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
#
# Check for target programs.
#
2009-04-12 04:33:18 +00:00
# Find tools for the target.
if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
tmp_ac_tool_prefix="$ac_tool_prefix"
ac_tool_prefix=$target_alias-
AC_CHECK_TOOLS(TARGET_CC, [gcc egcs cc],
[AC_MSG_ERROR([none of gcc, egcs and cc is found. set TARGET_CC manually.])])
2013-08-21 23:56:28 +00:00
AC_CHECK_TOOL(TARGET_OBJCOPY, objcopy)
AC_CHECK_TOOL(TARGET_STRIP, strip)
AC_CHECK_TOOL(TARGET_NM, nm)
2013-09-23 10:55:18 +00:00
AC_CHECK_TOOL(TARGET_RANLIB, ranlib)
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
ac_tool_prefix="$tmp_ac_tool_prefix"
else
if test "x$TARGET_CC" = x; then
TARGET_CC=$CC
fi
2013-08-21 23:56:28 +00:00
AC_CHECK_TOOL(TARGET_OBJCOPY, objcopy)
AC_CHECK_TOOL(TARGET_STRIP, strip)
AC_CHECK_TOOL(TARGET_NM, nm)
2013-09-23 10:55:18 +00:00
AC_CHECK_TOOL(TARGET_RANLIB, ranlib)
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
fi
2013-08-21 23:56:28 +00:00
2010-08-17 14:11:43 +00:00
AC_SUBST(HOST_CC)
AC_SUBST(BUILD_CC)
2013-08-14 08:56:55 +00:00
AC_SUBST(BUILD_CFLAGS)
AC_SUBST(BUILD_CPPFLAGS)
2014-01-18 15:50:54 +00:00
AC_SUBST(BUILD_LDFLAGS)
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
AC_SUBST(TARGET_CC)
2013-08-21 23:56:28 +00:00
AC_SUBST(TARGET_NM)
2013-09-23 11:20:32 +00:00
AC_SUBST(TARGET_RANLIB)
2013-08-21 23:56:28 +00:00
AC_SUBST(TARGET_STRIP)
AC_SUBST(TARGET_OBJCOPY)
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
# Test the C compiler for the target environment.
tmp_CC="$CC"
tmp_CFLAGS="$CFLAGS"
tmp_LDFLAGS="$LDFLAGS"
tmp_CPPFLAGS="$CPPFLAGS"
2006-06-01 15:51:51 +00:00
tmp_LIBS="$LIBS"
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
CC="$TARGET_CC"
CFLAGS="$TARGET_CFLAGS"
CPPFLAGS="$TARGET_CPPFLAGS"
LDFLAGS="$TARGET_LDFLAGS"
2006-06-01 15:51:51 +00:00
LIBS=""
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
2009-12-29 14:04:18 +00:00
# debug flags.
2012-02-24 11:30:32 +00:00
TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations"
2010-08-17 14:11:43 +00:00
TARGET_CCASFLAGS="$TARGET_CCASFLAGS -g"
2002-12-27 08:53:07 +00:00
2013-11-07 02:35:25 +00:00
if test "x$target_cpu" != xi386 && test "x$target_cpu" != xx86_64; then
TARGET_CFLAGS="$TARGET_CFLAGS -Wcast-align"
fi
2013-12-24 13:47:44 +00:00
TARGET_CC_VERSION="$(LC_ALL=C $TARGET_CC --version | head -n1)"
2013-12-04 09:08:57 +00:00
AC_CACHE_CHECK([which extra warnings work], [grub_cv_target_cc_w_extra_flags], [
LDFLAGS="$TARGET_LDFLAGS -nostdlib -static"
grub_cv_target_cc_w_extra_flags=
for x in $EXTRA_WARN_FLAGS; do
CFLAGS="$TARGET_CFLAGS $x -Werror"
2013-12-16 12:07:28 +00:00
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
asm (".globl start; start:");
void __main (void);
void __main (void) {}
int main (void);
]], [[]])], [flag=1], [flag=0])
2013-12-04 09:08:57 +00:00
if test x$flag = x1 ; then
grub_cv_target_cc_w_extra_flags="$grub_cv_target_cc_w_extra_flags $x"
fi
done
])
TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_w_extra_flags"
2015-02-20 20:29:35 +00:00
AC_CACHE_CHECK([if compiling with clang], [grub_cv_cc_target_clang],
2013-12-04 11:20:56 +00:00
[
CFLAGS="$TARGET_CFLAGS"
AC_COMPILE_IFELSE(
2013-11-07 10:44:40 +00:00
[AC_LANG_PROGRAM([], [[
#ifdef __clang__
#error "is clang"
#endif
]])],
[grub_cv_cc_target_clang=no], [grub_cv_cc_target_clang=yes])])
2015-10-13 22:42:14 +00:00
if test x$target_cpu = xpowerpc -o x$target_cpu = xmips; then
2015-07-21 23:54:59 +00:00
AC_CACHE_CHECK([for options to get big-endian compilation], grub_cv_target_cc_big_endian, [
grub_cv_target_cc_big_endian=no
2015-10-13 22:42:14 +00:00
for cand in "-target $target_cpu -Wl,-EB" "-target $target_cpu" \
"-target $target_cpu-linux-gnu -Wl,-EB" "-target $target_cpu-linux-gnu" \
"-EB" "-mbig-endian"; do
2015-07-21 23:54:59 +00:00
if test x"$grub_cv_target_cc_big_endian" != xno ; then
break
fi
CFLAGS="$TARGET_CFLAGS $cand -Werror"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__ORDER_BIG_ENDIAN__ != __BYTE_ORDER__)
#error still little endian
#endif
asm (".globl start; start:");
2015-10-13 22:42:14 +00:00
asm (".globl _start; _start:");
asm (".globl __start; __start:");
2015-07-21 23:54:59 +00:00
void __main (void);
void __main (void) {}
int main (void);
]], [[]])],
[grub_cv_target_cc_big_endian="$cand"], [])
done
])
if test x"$grub_cv_target_cc_big_endian" = xno ; then
AC_MSG_ERROR([could not force big-endian])
fi
skip_linkflags="$(echo "$grub_cv_target_cc_big_endian"|sed 's@-Wl,-EB@@')"
TARGET_CFLAGS="$TARGET_CFLAGS $skip_linkflags"
TARGET_CPPFLAGS="$TARGET_CPPFLAGS $skip_linkflags"
TARGET_CCASFLAGS="$TARGET_CCASFLAGS $skip_linkflags"
TARGET_LDFLAGS="$TARGET_LDFLAGS $grub_cv_target_cc_big_endian"
2015-10-13 22:42:14 +00:00
elif test x$target_cpu = xmipsel; then
AC_CACHE_CHECK([for options to get little-endian compilation], grub_cv_target_cc_little_endian, [
grub_cv_target_cc_little_endian=no
for cand in "-target $target_cpu -Wl,-EL" "-target $target_cpu" \
"-target $target_cpu-linux-gnu -Wl,-EL" "-target $target_cpu-linux-gnu" \
"-EL"; do
if test x"$grub_cv_target_cc_little_endian" != xno ; then
break
fi
CFLAGS="$TARGET_CFLAGS $cand -Werror"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__ORDER_BIG_ENDIAN__ == __BYTE_ORDER__)
#error still big endian
#endif
asm (".globl start; start:");
asm (".globl _start; _start:");
asm (".globl __start; __start:");
void __main (void);
void __main (void) {}
int main (void);
]], [[]])],
[grub_cv_target_cc_little_endian="$cand"], [])
done
])
if test x"$grub_cv_target_cc_little_endian" = xno ; then
AC_MSG_ERROR([could not force little-endian])
fi
skip_linkflags="$(echo "$grub_cv_target_cc_little_endian"|sed 's@-Wl,-EL@@')"
TARGET_CFLAGS="$TARGET_CFLAGS $skip_linkflags"
TARGET_CPPFLAGS="$TARGET_CPPFLAGS $skip_linkflags"
TARGET_CCASFLAGS="$TARGET_CCASFLAGS $skip_linkflags"
TARGET_LDFLAGS="$TARGET_LDFLAGS $grub_cv_target_cc_little_endian"
2015-07-21 23:54:59 +00:00
fi
2015-10-13 22:39:15 +00:00
# GRUB code is N32-compliant but it's experimental and we would prefer to
# avoid having too much variety when it doesn't result in any real improvement.
# Moreover N64 isn't supported.
if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
AC_CACHE_CHECK([for options to force MIPS o32 ABI], grub_cv_target_cc_mips_o32_abi, [
grub_cv_target_cc_mips_o32_abi=no
for arg in "" "-mabi=32" "-target $target_cpu -mabi=32" ; do
if test x"$grub_cv_target_cc_mips_o32_abi" != xno ; then
break
fi
CFLAGS="$TARGET_CFLAGS $arg -Werror"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#if !defined(_ABIO32) || !defined(_MIPS_SIM) || (_MIPS_SIM != _ABIO32)
#error not o32 ABI
#endif
asm (".globl start; start:");
asm (".globl _start; _start:");
asm (".globl __start; __start:");
void __main (void);
void __main (void) {}
int main (void);
]], [[]])],
[grub_cv_target_cc_mips_o32_abi="$arg"], [])
done
])
if test x"$grub_cv_target_cc_mips_o32_abi" = xno ; then
AC_MSG_ERROR([could not force MIPS o32 ABI])
fi
TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_mips_o32_abi"
TARGET_CCASFLAGS="$TARGET_CCASFLAGS $grub_cv_target_cc_mips_o32_abi"
fi
2015-02-21 15:29:28 +00:00
AC_CACHE_CHECK([for options to compile assembly], [grub_cv_cc_target_asm_compile], [
test_program=
2015-02-21 19:18:18 +00:00
case "x$target_cpu-$platform" in
xmips-* | xmipsel-*)
2015-02-21 15:29:28 +00:00
test_program=mips
;;
2015-02-21 19:18:18 +00:00
xi386-pc)
test_program=i386-pc
;;
xi386-* | xx86_64-*)
2015-02-21 15:29:28 +00:00
test_program=i386
;;
2015-02-21 19:18:18 +00:00
xpowerpc-* | xsparc64-* | xarm-*)
2015-02-21 15:29:28 +00:00
test_program=$target_cpu
;;
esac
if test x"$test_program" = x ; then
grub_cv_cc_target_asm_compile=
else
found=no
for arg in "" "-no-integrated-as"; do
cmdline="$TARGET_CC -c -o /dev/null $TARGET_CCASFLAGS $arg $TARGET_CPPFLAGS $srcdir/asm-tests/$test_program.S"
echo "Running $cmdline" >&AS_MESSAGE_LOG_FD
if $cmdline >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
grub_cv_cc_target_asm_compile="$arg"
found=yes
break
fi
done
if test x"$found" = xno ; then
AC_MSG_ERROR([could not compile assembly])
fi
2013-11-07 10:44:40 +00:00
fi
2015-02-21 15:29:28 +00:00
])
2013-11-07 10:44:40 +00:00
2015-02-21 15:29:28 +00:00
TARGET_CCASFLAGS="$TARGET_CCASFLAGS $grub_cv_cc_target_asm_compile"
2013-12-04 11:20:56 +00:00
2013-11-07 10:44:40 +00:00
if test "x$target_cpu" = xi386 && test "x$platform" != xemu; then
TARGET_CFLAGS="$TARGET_CFLAGS -march=i386"
fi
if test "x$target_m32" = x1; then
# Force 32-bit mode.
TARGET_CFLAGS="$TARGET_CFLAGS -m32"
TARGET_CCASFLAGS="$TARGET_CCASFLAGS -m32"
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -m32"
TARGET_LDFLAGS="$TARGET_LDFLAGS -m32"
TARGET_MODULE_FORMAT="elf32"
fi
if test "x$target_m64" = x1; then
# Force 64-bit mode.
TARGET_CFLAGS="$TARGET_CFLAGS -m64"
TARGET_CCASFLAGS="$TARGET_CCASFLAGS -m64"
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -m64"
TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
TARGET_MODULE_FORMAT="elf64"
fi
if test "x$grub_cv_cc_target_clang" = xno && test "x$target_cpu" = xi386 && test "x$platform" != xemu && test "x$platform" != xefi; then
TARGET_CFLAGS="$TARGET_CFLAGS -mrtd -mregparm=3"
fi
2013-11-23 11:40:44 +00:00
# on mips redirect cache flushing function to non-existant one.
if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
AC_CACHE_CHECK([whether -mflush-func=grub_red_herring works], [grub_cv_cc_mflush_func], [
CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring -Werror"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_cc_mflush_func=yes],
[grub_cv_cc_mflush_func=no])
])
if test "x$grub_cv_cc_mflush_func" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring"
fi
fi
2009-12-29 14:04:18 +00:00
# Force no alignment to save space on i386.
if test "x$target_cpu" = xi386; then
AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [
2013-11-07 02:31:24 +00:00
CFLAGS="$TARGET_CFLAGS -falign-loops=1 -Werror"
2008-09-21 17:38:33 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
2009-12-29 14:04:18 +00:00
[grub_cv_cc_falign_loop=yes],
[grub_cv_cc_falign_loop=no])
2002-12-27 08:53:07 +00:00
])
2013-11-07 02:25:30 +00:00
AC_CACHE_CHECK([whether -malign-loops works], [grub_cv_cc_malign_loop], [
2013-11-07 02:31:24 +00:00
CFLAGS="$TARGET_CFLAGS -malign-loops=1 -Werror"
2013-11-07 02:25:30 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_cc_malign_loop=yes],
[grub_cv_cc_malign_loop=no])
])
2009-12-29 14:04:18 +00:00
if test "x$grub_cv_cc_falign_loop" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1"
2013-11-07 02:25:30 +00:00
elif test "x$grub_cv_cc_malign_loop" = xyes; then
2009-12-29 14:04:18 +00:00
TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
2002-12-27 08:53:07 +00:00
fi
2013-05-07 18:42:05 +00:00
fi
2002-12-27 08:53:07 +00:00
2013-11-07 02:33:20 +00:00
AC_CACHE_CHECK([whether -freg-struct-return works], [grub_cv_cc_freg_struct_return], [
CFLAGS="$TARGET_CFLAGS -freg-struct-return -Werror"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_cc_freg_struct_return=yes],
[grub_cv_cc_freg_struct_return=no])
])
if test "x$grub_cv_cc_freg_struct_return" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -freg-struct-return"
fi
2013-05-08 09:01:11 +00:00
if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$platform" != xemu; then
2009-12-29 14:04:18 +00:00
# Some toolchains enable these features by default, but they need
# registers that aren't set up properly in GRUB.
2015-11-06 03:32:34 +00:00
TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow"
2009-12-29 14:04:18 +00:00
fi
2009-09-03 23:00:25 +00:00
2015-01-24 19:37:08 +00:00
# GRUB doesn't use float or doubles at all. Yet some toolchains may decide
# that floats are a good fit to run instead of what's written in the code.
# Given that floating point unit is disabled (if present to begin with)
# when GRUB is running which may result in various hard crashes.
2015-02-21 22:46:47 +00:00
if test x"$platform" != xemu ; then
AC_CACHE_CHECK([for options to get soft-float], grub_cv_target_cc_soft_float, [
grub_cv_target_cc_soft_float=no
if test "x$target_cpu" = xarm64; then
2015-06-02 14:41:09 +00:00
CFLAGS="$TARGET_CFLAGS -mgeneral-regs-only -Werror"
2015-02-21 22:46:47 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
2015-06-02 14:41:09 +00:00
[grub_cv_target_cc_soft_float="-mgeneral-regs-only"], [])
2015-02-21 22:46:47 +00:00
fi
2019-02-12 10:31:07 +00:00
if test "x$target_cpu" = xriscv32; then
CFLAGS="$TARGET_CFLAGS -march=rv32imac -mabi=ilp32 -Werror"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_target_cc_soft_float="-march=rv32imac -mabi=ilp32"], [])
fi
if test "x$target_cpu" = xriscv64; then
CFLAGS="$TARGET_CFLAGS -march=rv64imac -mabi=lp64 -Werror"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_target_cc_soft_float="-march=rv64imac -mabi=lp64"], [])
fi
2015-02-22 13:42:19 +00:00
if test "x$target_cpu" = xia64; then
CFLAGS="$TARGET_CFLAGS -mno-inline-float-divide -mno-inline-sqrt -Werror"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_target_cc_soft_float="-mno-inline-float-divide -mno-inline-sqrt"], [])
fi
2015-02-23 21:33:28 +00:00
for cand in "-msoft-float -Xclang -msoft-float -Xclang -no-implicit-float" \
"-Xclang -msoft-float -Xclang -no-implicit-float" \
2015-02-21 22:46:47 +00:00
"-Xclang -msoft-float" "-msoft-float"; do
if test x"$grub_cv_target_cc_soft_float" != xno ; then
break
fi
CFLAGS="$TARGET_CFLAGS $cand -Werror"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_target_cc_soft_float="$cand"], [])
done
])
if test x"$grub_cv_target_cc_soft_float" = xno ; then
AC_MSG_ERROR([could not force soft-float])
fi
case x"$grub_cv_target_cc_soft_float" in
2015-02-23 21:33:28 +00:00
x*"-Xclang"*)
2015-02-21 22:46:47 +00:00
# A trick so that clang doesn't see it on link stа ge
TARGET_CPPFLAGS="$TARGET_CPPFLAGS $grub_cv_target_cc_soft_float"
;;
*)
TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_soft_float"
;;
esac
2015-06-02 14:41:09 +00:00
TARGET_CCASFLAGS="$TARGET_CCASFLAGS $grub_cv_target_cc_soft_float"
2015-02-22 16:41:12 +00:00
2015-01-28 20:17:18 +00:00
fi
2015-01-24 19:37:08 +00:00
2015-02-22 00:53:00 +00:00
if test x"$target_cpu" = xsparc64 ; then
AC_CACHE_CHECK([for options to reserve application registers], grub_cv_target_cc_mno_app_regs, [
grub_cv_target_cc_mno_app_regs=no
for cand in "-mllvm -sparc-reserve-app-registers" \
"-mno-app-regs"; do
if test x"$grub_cv_target_cc_mno_app_regs" != xno ; then
break
fi
CFLAGS="$TARGET_CFLAGS $cand -Werror"
2015-03-03 08:07:53 +00:00
CPPFLAGS="$TARGET_CPPFLAGS"
2015-02-22 00:53:00 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_target_cc_mno_app_regs="$cand"], [])
done
])
if test x"$grub_cv_target_cc_mno_app_regs" = xno ; then
AC_MSG_ERROR([could not reserve application registers])
fi
if test x"$grub_cv_target_cc_mno_app_regs" = x"-mllvm -sparc-reserve-app-registers" ; then
# A trick so that clang doesn't see it on link stа ge
TARGET_CPPFLAGS="$TARGET_CPPFLAGS $grub_cv_target_cc_mno_app_regs"
else
TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_mno_app_regs"
fi
AC_CACHE_CHECK([for no-relax options], grub_cv_target_cc_mno_relax, [
grub_cv_target_cc_mno_relax=no
for cand in "-mno-relax" "-Wl,--no-relax"; do
if test x"$grub_cv_target_cc_mno_relax" != xno ; then
break
fi
LDFLAGS="$TARGET_LDFLAGS $cand -nostdlib -static"
CFLAGS="$TARGET_CFLAGS -Werror"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
asm (".globl start; start:");
void __main (void);
void __main (void) {}
int main (void);
]], [[]])], [grub_cv_target_cc_mno_relax="$cand"], [])
done
])
LDFLAGS="$TARGET_LDFLAGS"
CFLAGS="$TARGET_CFLAGS"
if test x"$grub_cv_target_cc_mno_relax" = xno ; then
AC_MSG_ERROR([could not find no-relax options])
fi
TARGET_LDFLAGS="$TARGET_LDFLAGS $grub_cv_target_cc_mno_relax"
fi
2009-12-29 14:04:18 +00:00
# By default, GCC 4.4 generates .eh_frame sections containing unwind
# information in some cases where it previously did not. GRUB doesn't need
# these and they just use up vital space. Restore the old compiler
# behaviour.
AC_CACHE_CHECK([whether -fno-dwarf2-cfi-asm works], [grub_cv_cc_fno_dwarf2_cfi_asm], [
2013-11-07 02:17:37 +00:00
CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
2009-12-29 14:04:18 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_cc_fno_dwarf2_cfi_asm=yes],
[grub_cv_cc_fno_dwarf2_cfi_asm=no])
])
2009-09-03 23:00:25 +00:00
2009-12-29 14:04:18 +00:00
if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
fi
2002-12-27 08:53:07 +00:00
2013-08-23 06:46:14 +00:00
if test x"$target_os" = xcygwin; then
AC_CACHE_CHECK([whether option -fno-reorder-functions works], grub_cv_cc_no_reorder_functions, [
2013-11-07 02:17:37 +00:00
CFLAGS="$TARGET_CFLAGS -fno-reorder-functions"
2013-08-23 06:46:14 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_cc_no_reorder_functions=yes],
[grub_cv_cc_no_reorder_functions=no])
])
fi
if test x"$target_os" = xcygwin && test "x$grub_cv_cc_no_reorder_functions" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -fno-reorder-functions"
fi
2015-12-31 17:15:49 +00:00
AC_CACHE_CHECK([whether -mno-stack-arg-probe works], [grub_cv_cc_mno_stack_arg_probe], [
CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_cc_mno_stack_arg_probe=yes],
[grub_cv_cc_mno_stack_arg_probe=no])
])
if test "x$grub_cv_cc_mno_stack_arg_probe" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
fi
2011-11-12 18:18:42 +00:00
# By default, GCC 4.6 generates .eh_frame sections containing unwind
# information in some cases where it previously did not. GRUB doesn't need
# these and they just use up vital space. Restore the old compiler
# behaviour.
AC_CACHE_CHECK([whether -fno-asynchronous-unwind-tables works], [grub_cv_cc_fno_asynchronous_unwind_tables], [
2015-12-31 17:19:15 +00:00
CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
2011-11-12 18:18:42 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_cc_fno_asynchronous_unwind_tables=yes],
[grub_cv_cc_fno_asynchronous_unwind_tables=no])
])
if test "x$grub_cv_cc_fno_asynchronous_unwind_tables" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
fi
2015-12-31 18:20:03 +00:00
AC_CACHE_CHECK([whether -fno-unwind-tables works], [grub_cv_cc_fno_unwind_tables], [
CFLAGS="$TARGET_CFLAGS -fno-unwind-tables"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_cc_fno_unwind_tables=yes],
[grub_cv_cc_fno_unwind_tables=no])
])
if test "x$grub_cv_cc_fno_unwind_tables" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -fno-unwind-tables"
fi
2012-01-13 14:12:28 +00:00
2013-11-14 22:17:18 +00:00
CFLAGS="$TARGET_CFLAGS"
2013-12-21 19:19:34 +00:00
if test x"$platform" = xemu ; then
TARGET_OBJ2ELF=
grub_cv_target_cc_link_format=
case "$host_os" in
*darwin* | *mac*)
grub_cv_target_cc_link_format="-arch,${target_cpu}"
TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,$grub_cv_target_cc_link_format"
;;
*windows* | *cygwin* | *mingw*)
if test x${target_cpu} = xi386 ; then
2014-09-07 19:47:43 +00:00
grub_cv_target_cc_link_format=-mi386pe
TARGET_OBJ2ELF='./build-grub-pe2elf$(BUILD_EXEEXT)'
2013-12-21 19:19:34 +00:00
fi
if test x${target_cpu} = xx86_64 ; then
2014-09-07 19:47:43 +00:00
grub_cv_target_cc_link_format=-mi386pep
TARGET_OBJ2ELF='./build-grub-pep2elf$(BUILD_EXEEXT)'
2013-12-21 19:19:34 +00:00
fi
TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,$grub_cv_target_cc_link_format"
;;
esac
elif test x"$target_cpu" = xi386 || test x"$target_cpu" = xx86_64; then
2013-11-24 17:12:17 +00:00
AC_CACHE_CHECK([for target linking format], [grub_cv_target_cc_link_format], [
2013-11-14 22:17:18 +00:00
grub_cv_target_cc_link_format=unknown
2013-12-16 14:30:50 +00:00
for format in -melf_${target_cpu} -melf_${target_cpu}_fbsd -melf_${target_cpu}_obsd -melf_${target_cpu}_haiku -mi386pe -mi386pep -arch,${target_cpu}; do
2013-12-21 19:19:34 +00:00
if test x${target_cpu} != xi386 && test x$format = x-mi386pe; then
2013-12-16 14:30:50 +00:00
continue
fi
2013-12-21 19:19:34 +00:00
if test x${target_cpu} != xx86_64 && test x$format = x-mi386pep; then
2013-11-14 22:17:18 +00:00
continue
fi
2013-11-25 04:47:20 +00:00
CFLAGS="$TARGET_CFLAGS"
LDFLAGS="$TARGET_LDFLAGS -Wl,$format -nostdlib -static"
2013-11-14 22:17:18 +00:00
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
asm (".globl start; start:");
asm (".globl _start; _start:");
asm (".globl __start; __start:");
void __main (void);
void __main (void) {}
2013-11-24 17:12:17 +00:00
]], [[]])], [flag=1], [flag=0])
2013-11-14 22:17:18 +00:00
if test x"$flag" = x1; then
grub_cv_target_cc_link_format="$format"
2014-09-07 19:47:43 +00:00
break
2013-11-14 22:17:18 +00:00
fi
done])
if test x"$grub_cv_target_cc_link_format" = xunknown; then
AC_MSG_ERROR([no suitable link format found])
fi
TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,$grub_cv_target_cc_link_format"
2013-12-16 14:30:50 +00:00
if test x"$grub_cv_target_cc_link_format" = x-mi386pe ; then
2014-09-07 19:47:43 +00:00
TARGET_OBJ2ELF='./build-grub-pe2elf$(BUILD_EXEEXT)'
2013-11-14 22:17:18 +00:00
fi
2013-12-16 14:30:50 +00:00
if test x"$grub_cv_target_cc_link_format" = x-mi386pep ; then
2014-09-07 19:47:43 +00:00
TARGET_OBJ2ELF='./build-grub-pep2elf$(BUILD_EXEEXT)'
2013-12-16 14:30:50 +00:00
fi
2013-11-14 22:17:18 +00:00
fi
if test x$grub_cv_target_cc_link_format = x-arch,i386 || test x$grub_cv_target_cc_link_format = x-arch,x86_64; then
TARGET_APPLE_LINKER=1
AC_CHECK_PROG([TARGET_OBJCONV], [objconv], [objconv], [])
if test "x$TARGET_OBJCONV" = x ; then
AC_CHECK_PROG([TARGET_OBJCONV], [objconv], [./objconv], [], [.])
fi
if test "x$TARGET_OBJCONV" = x ; then
AC_MSG_ERROR([objconv not found which is required when building with apple compiler])
fi
TARGET_IMG_LDSCRIPT=
TARGET_IMG_CFLAGS="-static"
TARGET_IMG_LDFLAGS='-nostdlib -static -Wl,-preload -Wl,-segalign,20'
TARGET_IMG_LDFLAGS_AC='-nostdlib -static -Wl,-preload -Wl,-segalign,20'
TARGET_IMG_BASE_LDOPT="-Wl,-image_base"
TARGET_LDFLAGS_OLDMAGIC=""
2013-12-16 14:30:50 +00:00
elif test x$grub_cv_target_cc_link_format = x-mi386pe || test x$grub_cv_target_cc_link_format = x-mi386pep ; then
2013-11-14 22:17:18 +00:00
TARGET_APPLE_LINKER=0
TARGET_LDFLAGS_OLDMAGIC="-Wl,-N"
2013-12-14 22:12:53 +00:00
TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/${grub_coredir}/conf/i386-cygwin-img-ld.sc"
2013-11-14 22:17:18 +00:00
TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT}"
2013-12-14 22:12:53 +00:00
TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/${grub_coredir}/conf/i386-cygwin-img-ld.sc"
2013-11-14 22:17:18 +00:00
TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"
TARGET_IMG_CFLAGS=
else
TARGET_APPLE_LINKER=0
TARGET_LDFLAGS_OLDMAGIC="-Wl,-N"
TARGET_IMG_LDSCRIPT=
TARGET_IMG_LDFLAGS='-Wl,-N'
TARGET_IMG_LDFLAGS_AC='-Wl,-N'
TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"
TARGET_IMG_CFLAGS=
fi
2015-12-31 21:34:26 +00:00
CFLAGS="$TARGET_CFLAGS"
AC_ARG_ENABLE([efiemu],
[AS_HELP_STRING([--enable-efiemu],
[build and install the efiemu runtimes (default=guessed)])])
if test x"$enable_efiemu" = xno ; then
efiemu_excuse="explicitly disabled"
fi
if test x"$grub_cv_target_cc_link_format" = x-mi386pe || test x"$grub_cv_target_cc_link_format" = x-mi386pep ; then
efiemu_excuse="not available on cygwin"
fi
if test x"$target_cpu" != xi386 ; then
efiemu_excuse="only available on i386"
fi
if test x"$platform" = xefi ; then
efiemu_excuse="not available on efi"
fi
if test x"$efiemu_excuse" = x ; then
AC_CACHE_CHECK([whether options required for efiemu work], grub_cv_cc_efiemu, [
CFLAGS="-m64 -nostdlib -O2 -mcmodel=large -mno-red-zone"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_cc_efiemu=yes],
[grub_cv_cc_efiemu=no])
])
if test x$grub_cv_cc_efiemu = xno; then
efiemu_excuse="cannot compile with -m64 -mcmodel=large -mno-red-zone -nostdlib"
fi
fi
if test x"$efiemu_excuse" = x ; then
AC_CACHE_CHECK([for efiemu64 linking format], [grub_cv_target_cc_efiemu64_link_format], [
grub_cv_target_cc_efiemu64_link_format=unknown
for format in -melf_x86_64 -melf_x86_64_fbsd -melf_x86_64_obsd -melf_x86_64_haiku -arch,x86_64; do
CFLAGS="-m64 -nostdlib -O2 -mcmodel=large -mno-red-zone"
LDFLAGS="-m64 -Wl,$format -nostdlib -static"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
asm (".globl start; start:");
asm (".globl _start; _start:");
asm (".globl __start; __start:");
void __main (void);
void __main (void) {}
]], [[]])], [flag=1], [flag=0])
if test x"$flag" = x1; then
grub_cv_target_cc_efiemu64_link_format="$format"
break
fi
done])
if test x"$grub_cv_target_cc_efiemu64_link_format" = xunknown; then
efiemu_excuse="no suitable link format for efiemu64 found"
else
EFIEMU64_LINK_FORMAT="-Wl,$grub_cv_target_cc_efiemu64_link_format"
fi
fi
if test x"$enable_efiemu" = xyes && test x"$efiemu_excuse" != x ; then
AC_MSG_ERROR([efiemu runtime was explicitly requested but can't be compiled ($efiemu_excuse)])
fi
if test x"$efiemu_excuse" = x ; then
enable_efiemu=yes
else
enable_efiemu=no
fi
AC_SUBST([enable_efiemu])
AC_SUBST([EFIEMU64_LINK_FORMAT])
CFLAGS="$TARGET_CFLAGS"
2013-11-14 22:17:18 +00:00
AC_SUBST(TARGET_LDFLAGS_OLDMAGIC)
LDFLAGS="$TARGET_LDFLAGS"
2013-08-22 17:00:25 +00:00
2019-02-12 10:31:07 +00:00
if test "$target_cpu" = x86_64 || test "$target_cpu" = sparc64 || test "$target_cpu" = riscv64 ; then
2009-03-04 05:56:31 +00:00
# Use large model to support 4G memory
2009-02-24 13:19:46 +00:00
AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [
2014-09-07 22:04:35 +00:00
CFLAGS="$TARGET_CFLAGS -mcmodel=large"
2009-02-24 13:19:46 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_cc_mcmodel=yes],
[grub_cv_cc_mcmodel=no])
])
2013-11-22 12:07:51 +00:00
if test "x$grub_cv_cc_mcmodel" = xyes; then
2009-06-04 20:25:11 +00:00
TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large"
2019-02-12 10:31:07 +00:00
elif test "$target_cpu" = sparc64 || test "$target_cpu" = riscv64; then
2013-12-09 23:05:28 +00:00
TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=medany"
2009-02-24 13:19:46 +00:00
fi
2013-04-29 17:14:46 +00:00
fi
2009-03-04 05:56:31 +00:00
2013-04-29 17:14:46 +00:00
if test "$target_cpu"-"$platform" = x86_64-efi; then
2009-03-04 05:56:31 +00:00
# EFI writes to stack below %rsp, we must not use the red zone
AC_CACHE_CHECK([whether option -mno-red-zone works], grub_cv_cc_no_red_zone, [
2014-09-07 22:04:35 +00:00
CFLAGS="$TARGET_CFLAGS -mno-red-zone"
2009-03-04 05:56:31 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_cc_no_red_zone=yes],
[grub_cv_cc_no_red_zone=no])
])
if test "x$grub_cv_cc_no_red_zone" = xno; then
AC_MSG_ERROR([-mno-red-zone not supported, upgrade your gcc])
fi
2009-06-04 20:25:11 +00:00
TARGET_CFLAGS="$TARGET_CFLAGS -mno-red-zone"
2008-07-17 09:50:26 +00:00
fi
2013-12-06 10:58:17 +00:00
if test "x$target_cpu" = xarm; then
2017-01-28 14:41:23 +00:00
AC_CACHE_CHECK([for options to disable movt and movw], grub_cv_target_cc_mno_movt, [
grub_cv_target_cc_mno_movt=no
for cand in "-mno-movt" \
"-mllvm -arm-use-movt=0"; do
if test x"$grub_cv_target_cc_mno_movt" != xno ; then
break
fi
CFLAGS="$TARGET_CFLAGS $cand -Werror"
CPPFLAGS="$TARGET_CPPFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_target_cc_mno_movt="$cand"], [])
done
2017-01-22 21:52:32 +00:00
])
2017-01-28 14:41:23 +00:00
if test x"$grub_cv_target_cc_mno_movt" != xno ; then
2017-01-22 21:52:32 +00:00
# A trick so that clang doesn't see it on link stage
2017-01-28 14:41:23 +00:00
TARGET_CPPFLAGS="$TARGET_CPPFLAGS $grub_cv_target_cc_mno_movt"
2017-01-22 21:52:32 +00:00
fi
2013-12-18 12:33:39 +00:00
AC_CACHE_CHECK([whether option -mthumb-interwork works], grub_cv_cc_mthumb_interwork, [
CFLAGS="$TARGET_CFLAGS -mthumb-interwork -Werror"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_cc_mthumb_interwork=yes],
[grub_cv_cc_mthumb_interwork=no])
])
if test "x$grub_cv_cc_mthumb_interwork" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -mthumb-interwork"
2015-02-22 16:45:30 +00:00
# Clang defaults to thumb interworking
2013-12-18 12:33:39 +00:00
elif test "x$grub_cv_cc_target_clang" = xno ; then
AC_MSG_ERROR([your compiler doesn't support -mthumb-interwork])
fi
2013-12-06 10:58:17 +00:00
fi
2013-12-24 14:00:46 +00:00
AC_CACHE_CHECK([whether option -Qn works], grub_cv_target_cc_qn, [
2019-03-25 16:43:18 +00:00
CFLAGS="$TARGET_CFLAGS -Qn -Qunused-arguments -Werror"
2013-12-24 14:00:46 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
[grub_cv_target_cc_qn=yes],
[grub_cv_target_cc_qn=no])])
if test "x$grub_cv_target_cc_qn" = xyes; then
2019-03-25 16:43:18 +00:00
TARGET_CFLAGS="$TARGET_CFLAGS -Qn -Qunused-arguments"
2013-12-24 14:00:46 +00:00
fi
2007-02-03 11:36:13 +00:00
#
# Compiler features.
#
2013-11-10 12:10:45 +00:00
CFLAGS="$TARGET_CFLAGS"
2009-09-03 16:32:14 +00:00
# Position independent executable.
grub_CHECK_PIE
2016-12-14 17:44:41 +00:00
grub_CHECK_NO_PIE
2017-01-30 13:38:50 +00:00
grub_CHECK_NO_PIE_ONEWORD
grub_CHECK_LINK_PIE
2009-09-03 16:32:14 +00:00
[# Need that, because some distributions ship compilers that include
2016-12-14 17:44:41 +00:00
# `-fPIE' or '-fpie' and '-pie' in the default specs.
2009-09-03 16:32:14 +00:00
if [ x"$pie_possible" = xyes ]; then
2016-03-22 17:12:22 +00:00
TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE -fno-pie"
2016-12-14 17:44:41 +00:00
fi
2017-01-30 13:38:50 +00:00
if [ x"$link_nopie_needed" = xyes ] || [ x"$pie_possible" = xyes ]; then
if [ x"$nopie_possible" = xyes ]; then
TARGET_LDFLAGS="$TARGET_LDFLAGS -no-pie"
fi
if [ x"$nopie_oneword_possible" = xyes ]; then
TARGET_LDFLAGS="$TARGET_LDFLAGS -nopie"
fi
2009-09-03 16:32:14 +00:00
fi]
2013-11-10 12:10:45 +00:00
CFLAGS="$TARGET_CFLAGS"
2016-12-14 17:44:41 +00:00
LDFLAGS="$TARGET_LDFLAGS"
2013-11-10 12:10:45 +00:00
2012-02-29 14:30:11 +00:00
# Position independent executable.
grub_CHECK_PIC
2013-11-22 11:50:41 +00:00
[# On most platforms we don't want PIC as it only makes relocations harder
# and code less efficient. On mips we want to have one got table per module
# and reload $gp in every function.
# GCC implements it using symbol __gnu_local_gp in non-PIC as well.
# However with clang we need PIC for this reloading to happen.
2017-02-02 00:24:11 +00:00
# With arm64 we need relocations that are in some way representable in
# PE as we need to support arm64-efi. Without -fPIC clang generates
# movk's which aren't representable.
2013-11-22 11:50:41 +00:00
# Since default varies across dictributions use either -fPIC or -fno-PIC
# explicitly.
2017-02-02 00:24:11 +00:00
if ( test x$target_cpu = xmips || test x$target_cpu = xmipsel || test x$target_cpu = xarm64 ) && test "x$grub_cv_cc_target_clang" = xyes ; then
2013-11-22 11:50:41 +00:00
TARGET_CFLAGS="$TARGET_CFLAGS -fPIC"
elif [ x"$pic_possible" = xyes ]; then
TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIC"
2012-02-29 14:30:11 +00:00
fi]
2013-11-10 12:10:45 +00:00
CFLAGS="$TARGET_CFLAGS"
2007-02-03 11:36:13 +00:00
# Smashing stack protector.
grub_CHECK_STACK_PROTECTOR
2008-02-13 03:35:48 +00:00
# Need that, because some distributions ship compilers that include
2007-02-03 11:36:13 +00:00
# `-fstack-protector' in the default specs.
2008-02-13 03:35:48 +00:00
if test "x$ssp_possible" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -fno-stack-protector"
fi
2013-11-10 12:10:45 +00:00
CFLAGS="$TARGET_CFLAGS"
2008-07-24 14:56:30 +00:00
grub_CHECK_STACK_ARG_PROBE
# Cygwin's GCC uses alloca() to probe the stackframe on static
# stack allocations above some threshold.
if test x"$sap_possible" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
fi
2007-02-03 11:36:13 +00:00
2013-11-10 12:10:45 +00:00
CFLAGS="$TARGET_CFLAGS"
2013-11-30 10:31:14 +00:00
# -mno-unaligned-access -mstrict-align
2013-05-03 12:41:08 +00:00
if test "$target_cpu" = arm; then
2013-11-30 10:31:14 +00:00
AC_CACHE_CHECK([for compile options to get strict alignment], [grub_cv_target_cc_strict_align], [
2013-12-04 11:42:09 +00:00
grub_cv_target_cc_strict_align=
2013-11-30 10:31:14 +00:00
for arg in -mno-unaligned-access "-Xclang -mstrict-align" -mstrict-align; do
CFLAGS="$TARGET_CFLAGS $arg -Werror"
LDFLAGS="$TARGET_LDFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [flag=1], [flag=0])
if test x"$flag" = x1; then
grub_cv_target_cc_strict_align="$arg"
2014-09-07 19:47:43 +00:00
break
2013-11-30 10:31:14 +00:00
fi
done])
TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_strict_align"
if test x"$grub_cv_target_cc_strict_align" = x"-Xclang -mstrict-align"; then
TARGET_LDFLAGS="$TARGET_LDFLAGS -Qunused-arguments"
2013-05-03 12:41:08 +00:00
fi
2013-12-04 11:42:09 +00:00
AC_CACHE_CHECK([if compiler generates unaligned accesses], [grub_cv_cc_target_emits_unaligned],
[CFLAGS="$TARGET_CFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
#ifdef __ARM_FEATURE_UNALIGNED
#error "unaligned"
#endif
]])],
[grub_cv_cc_target_emits_unaligned=no], [grub_cv_cc_target_emits_unaligned=yes])])
if test x$grub_cv_cc_target_emits_unaligned = xyes; then
AC_MSG_ERROR([compiler generates unaligned accesses])
fi
2013-05-03 12:41:08 +00:00
fi
2006-06-01 15:51:51 +00:00
# Set them to their new values for the tests below.
CC="$TARGET_CC"
2015-03-03 19:23:42 +00:00
if test x"$platform" = xemu ; then
CFLAGS="$TARGET_CFLAGS -Wno-error"
elif test "x$TARGET_APPLE_LINKER" = x1 ; then
2013-11-25 04:47:20 +00:00
CFLAGS="$TARGET_CFLAGS -nostdlib -static -Wno-error"
2009-06-18 14:02:23 +00:00
else
2013-12-16 12:07:28 +00:00
CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error"
2009-06-18 14:02:23 +00:00
fi
2006-06-01 15:51:51 +00:00
CPPFLAGS="$TARGET_CPPFLAGS"
2013-11-07 17:21:22 +00:00
2010-04-11 14:14:51 +00:00
grub_ASM_USCORE
2015-03-03 19:23:42 +00:00
if test "x$TARGET_APPLE_LINKER" = x0 && test x"$platform" != xemu; then
2010-04-11 14:14:51 +00:00
if test x$grub_cv_asm_uscore = xyes; then
2013-12-16 12:07:28 +00:00
DEFSYM="-Wl,--defsym,_abort=_main -Wl,--defsym,__main=_main"
2010-04-11 14:14:51 +00:00
else
2013-12-16 12:07:28 +00:00
DEFSYM="-Wl,--defsym,abort=main -Wl,--defsym,_main=main -Wl,--defsym,__main=main"
2010-04-11 14:14:51 +00:00
fi
2013-12-16 12:07:28 +00:00
CFLAGS="$TARGET_CFLAGS -nostdlib $DEFSYM"
2013-11-14 22:17:18 +00:00
fi
2010-04-11 14:14:51 +00:00
2010-01-23 21:56:08 +00:00
# Check for libgcc symbols
2015-03-03 19:23:42 +00:00
if test x"$platform" = xemu; then
2015-07-23 00:15:46 +00:00
AC_CHECK_FUNCS(__udivsi3 __umodsi3 __divsi3 __modsi3 __divdi3 __moddi3 __udivdi3 __umoddi3 __ctzdi2 __ctzsi2 __aeabi_uidiv __aeabi_uidivmod __aeabi_idiv __aeabi_idivmod __aeabi_ulcmp __muldi3 __aeabi_lmul __aeabi_memcpy __aeabi_memcpy4 __aeabi_memcpy8 __aeabi_memclr __aeabi_memclr4 __aeabi_memclr8 __aeabi_memset __aeabi_lasr __aeabi_llsl __aeabi_llsr _restgpr_14_x __ucmpdi2 __ashldi3 __ashrdi3 __lshrdi3 __bswapsi2 __bswapdi2 __bzero __register_frame_info __deregister_frame_info ___chkstk_ms __chkstk_ms)
2015-03-03 19:23:42 +00:00
fi
2010-01-23 21:56:08 +00:00
2013-11-14 22:17:18 +00:00
if test "x$TARGET_APPLE_LINKER" = x1 ; then
2013-11-25 04:47:20 +00:00
CFLAGS="$TARGET_CFLAGS -nostdlib -static"
2010-01-23 21:56:08 +00:00
else
2013-12-16 12:07:28 +00:00
CFLAGS="$TARGET_CFLAGS -nostdlib"
2010-01-23 21:56:08 +00:00
fi
2010-01-26 00:57:56 +00:00
LIBS=""
2006-06-01 15:51:51 +00:00
2002-12-27 08:53:07 +00:00
# Defined in aclocal.m4.
2008-07-17 20:19:55 +00:00
grub_PROG_TARGET_CC
2013-11-14 22:17:18 +00:00
if test "x$TARGET_APPLE_LINKER" != x1 ; then
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
grub_PROG_OBJCOPY_ABSOLUTE
2009-06-04 19:53:52 +00:00
fi
2008-07-02 19:03:23 +00:00
grub_PROG_LD_BUILD_ID_NONE
2006-05-29 Yoshinori K. Okuji <okuji@enbug.org>
* util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/i386/pc/grub-install.in (host_cpu): Removed.
(target_cpu): New variable.
(pkglibdir): Use target_cpu instead of host_cpu.
* util/genmoddep.c: Removed.
* kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
instead of GRUB_HOST_SIZEOF_VOID_P.
* kern/dl.c: Likewise.
* include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
to ...
(GRUB_TARGET_SIZEOF_VOID_P): ... this.
(GRUB_HOST_SIZEOF_LONG): Renamed to ...
(GRUB_TARGET_SIZEOF_LONG): ... this.
(GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
(GRUB_TARGET_WORDS_BIGENDIAN): ... this.
* include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
[!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
instead of GRUB_HOST_SIZEOF_LONG.
[!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
GRUB_HOST_WORDS_BIGENDIAN to define or undefine
GRUB_CPU_WORDS_BIGENDIAN.
Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
grub_host_ssize_t.
* conf/i386-efi.rmk (noinst_UTILITIES): Removed.
(genmoddep_SOURCES): Likewise.
* conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
(genmoddep_SOURCES): Likewise.
* conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
Likewise.
(genmoddep_SOURCES): Likewise.
* genmoddep.awk: New file.
* genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
(PModule::rule): Likewise.
(Program::rule): Likewise.
(Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
respectively.
* configure.ac: Rewritten intensively to use host and target
instead of build and host, respectively.
* Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
(host_cpu): Removed.
(target_cpu): New variable.
(CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
(BUILD_CC): Removed.
(BUILD_CFLAGS): Likewise.
(BUILD_CPPFLAGS): Likewise.
(TARGET_CC): New variable.
(TARGET_CFLAGS): Likewise.
(TARGET_CPPFLAGS): Likewise.
(TARGET_LDFLAGS): Likewise.
(AWK): Likewise.
(include): Use target_cpu instead of host_cpu.
(moddep.lst:): Use genmoddep.awk instead of genmoddep.
* DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
2006-05-28 23:01:43 +00:00
if test "x$target_cpu" = xi386; then
2013-11-14 22:17:18 +00:00
if test "$platform" != emu && test "x$TARGET_APPLE_LINKER" != x1 ; then
2010-04-24 20:41:52 +00:00
if test ! -z "$TARGET_IMG_LDSCRIPT"; then
# Check symbols provided by linker script.
2013-12-16 12:07:28 +00:00
CFLAGS="$TARGET_CFLAGS -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${TARGET_IMG_BASE_LDOPT},0x8000"
2010-04-24 20:41:52 +00:00
fi
2008-07-24 14:56:30 +00:00
grub_CHECK_BSS_START_SYMBOL
grub_CHECK_END_SYMBOL
fi
CFLAGS="$TARGET_CFLAGS"
2002-12-27 08:53:07 +00:00
fi
2013-11-14 16:39:01 +00:00
grub_PROG_NM_WORKS
grub_PROG_NM_MINUS_P
grub_PROG_NM_DEFINED_ONLY
AC_SUBST(TARGET_NMFLAGS_MINUS_P)
AC_SUBST(TARGET_NMFLAGS_DEFINED_ONLY)
2010-03-14 15:01:31 +00:00
if test "$platform" != emu; then
2010-03-06 16:22:04 +00:00
AC_CACHE_CHECK([whether -nostdinc -isystem works], [grub_cv_cc_isystem], [
SAVED_CPPFLAGS="$CPPFLAGS"
2019-03-25 15:09:04 +00:00
CPPFLAGS="$TARGET_CPPFLAGS -nostdlib -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
2010-03-06 16:22:04 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
2012-08-05 14:49:03 +00:00
#include <stddef.h>
2010-03-06 16:22:04 +00:00
int va_arg_func (int fixed, va_list args);]], [[]])],
[grub_cv_cc_isystem=yes],
[grub_cv_cc_isystem=no])
CPPFLAGS="$SAVED_CPPFLAGS"
])
if test x"$grub_cv_cc_isystem" = xyes ; then
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
fi
2010-03-14 15:27:54 +00:00
fi
2009-07-16 16:37:18 +00:00
2013-03-03 14:57:30 +00:00
AC_CACHE_CHECK([whether -Wtrampolines work], [grub_cv_cc_wtrampolines], [
2013-11-07 02:17:37 +00:00
CFLAGS="$TARGET_CFLAGS -Wtrampolines -Werror"
2010-11-14 16:13:44 +00:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
int va_arg_func (int fixed, va_list args);]], [[]])],
2013-03-03 14:57:30 +00:00
[grub_cv_cc_wtrampolines=yes],
[grub_cv_cc_wtrampolines=no])
2010-11-14 16:13:44 +00:00
])
2013-03-03 14:57:30 +00:00
if test x"$grub_cv_cc_wtrampolines" = xyes ; then
TARGET_CFLAGS="$TARGET_CFLAGS -Wtrampolines"
2010-11-14 16:13:44 +00:00
fi
2006-04-02 08:53:31 +00:00
# Restore the flags.
2002-12-27 14:14:06 +00:00
CC="$tmp_CC"
CFLAGS="$tmp_CFLAGS"
CPPFLAGS="$tmp_CPPFLAGS"
2006-04-02 08:53:31 +00:00
LDFLAGS="$tmp_LDFLAGS"
2006-06-01 15:51:51 +00:00
LIBS="$tmp_LIBS"
2002-12-27 08:53:07 +00:00
2006-12-13 22:30:19 +00:00
#
2006-04-25 20:08:31 +00:00
# Check for options.
2006-12-13 22:30:19 +00:00
#
# Memory manager debugging.
2009-06-10 21:04:23 +00:00
AC_ARG_ENABLE([mm-debug],
2006-04-25 20:08:31 +00:00
AS_HELP_STRING([--enable-mm-debug],
2006-07-12 20:42:52 +00:00
[include memory manager debugging]),
2006-04-25 20:08:31 +00:00
[AC_DEFINE([MM_DEBUG], [1],
[Define to 1 if you enable memory manager debugging.])])
2010-10-06 17:57:01 +00:00
AC_ARG_ENABLE([cache-stats],
AS_HELP_STRING([--enable-cache-stats],
2011-08-19 15:24:18 +00:00
[enable disk cache statistics collection]))
2010-10-06 17:57:01 +00:00
if test x$enable_cache_stats = xyes; then
DISK_CACHE_STATS=1
else
DISK_CACHE_STATS=0
fi
AC_SUBST([DISK_CACHE_STATS])
2013-03-19 19:25:09 +00:00
AC_ARG_ENABLE([boot-time],
AS_HELP_STRING([--enable-boot-time],
[enable boot time statistics collection]))
if test x$enable_boot_time = xyes; then
BOOT_TIME_STATS=1
else
BOOT_TIME_STATS=0
fi
AC_SUBST([BOOT_TIME_STATS])
2009-11-20 09:28:42 +00:00
AC_ARG_ENABLE([grub-emu-sdl],
[AS_HELP_STRING([--enable-grub-emu-sdl],
[build and install the `grub-emu' debugging utility with SDL support (default=guessed)])])
2009-10-14 08:11:59 +00:00
AC_ARG_ENABLE([grub-emu-pci],
[AS_HELP_STRING([--enable-grub-emu-pci],
[build and install the `grub-emu' debugging utility with PCI support (potentially dangerous) (default=no)])])
2009-11-23 15:31:54 +00:00
if test "$platform" = emu; then
2009-11-20 09:28:42 +00:00
if test x"$enable_grub_emu_sdl" = xno ; then
2013-12-23 13:32:35 +00:00
grub_emu_sdl_excuse="explicitly disabled"
2009-11-20 09:28:42 +00:00
fi
[if [ x"$grub_emu_sdl_excuse" = x ]; then
# Check for libSDL libraries.]
AC_CHECK_LIB([SDL], [SDL_Init], [LIBSDL="-lSDL"],
[grub_emu_sdl_excuse=["libSDL libraries are required to build \`grub-emu' with SDL support"]])
AC_SUBST([LIBSDL])
[fi]
2009-12-25 20:32:46 +00:00
2009-11-20 09:28:42 +00:00
[if [ x"$grub_emu_sdl_excuse" = x ]; then
# Check for headers.]
AC_CHECK_HEADERS([SDL/SDL.h], [],
[grub_emu_sdl_excuse=["libSDL header file is required to build \`grub-emu' with SDL support"]])
[fi]
2009-12-25 20:32:46 +00:00
2009-11-20 09:28:42 +00:00
if test x"enable_grub_emu_sdl" = xyes && test x"$grub_emu_sdl_excuse" != x ; then
2013-12-23 13:32:35 +00:00
AC_MSG_ERROR([SDL support for grub-emu was explicitly requested but can't be compiled ($grub_emu_sdl_excuse)])
2009-11-20 09:28:42 +00:00
fi
if test x"$grub_emu_sdl_excuse" = x ; then
enable_grub_emu_sdl=yes
else
enable_grub_emu_sdl=no
fi
2009-10-14 08:11:59 +00:00
if test x"$enable_grub_emu_pci" != xyes ; then
2009-10-14 08:36:37 +00:00
grub_emu_pci_excuse="not enabled"
fi
[if [ x"$grub_emu_pci_excuse" = x ]; then
# Check for libpci libraries.]
2009-10-14 16:17:18 +00:00
AC_CHECK_LIB([pciaccess], [pci_system_init], [LIBPCIACCESS="-lpciaccess"],
[grub_emu_pci_excuse=["need libpciaccess library"]])
AC_SUBST([LIBPCIACCESS])
2009-10-14 08:36:37 +00:00
[fi]
[if [ x"$grub_emu_pci_excuse" = x ]; then
# Check for headers.]
2015-03-04 00:01:45 +00:00
AC_CHECK_HEADERS([pciaccess.h], [],
2009-10-14 16:17:18 +00:00
[grub_emu_pci_excuse=["need libpciaccess headers"]])
2009-10-14 08:36:37 +00:00
[fi]
if test x"$grub_emu_pci_excuse" = x ; then
enable_grub_emu_pci=yes
else
2009-12-25 20:32:46 +00:00
2009-10-14 08:36:37 +00:00
enable_grub_emu_pci=no
2009-10-14 08:11:59 +00:00
fi
2009-11-20 09:28:42 +00:00
AC_SUBST([enable_grub_emu_sdl])
2009-10-14 08:11:59 +00:00
AC_SUBST([enable_grub_emu_pci])
2013-11-04 12:53:39 +00:00
else
# Ignore --enable-emu-* if platform is not emu
enable_grub_emu_sdl=no
enable_grub_emu_pci=no
2009-11-23 15:31:54 +00:00
fi
2006-12-13 22:30:19 +00:00
2009-01-13 16:34:26 +00:00
AC_ARG_ENABLE([grub-mkfont],
[AS_HELP_STRING([--enable-grub-mkfont],
2009-07-16 16:37:18 +00:00
[build and install the `grub-mkfont' utility (default=guessed)])])
if test x"$enable_grub_mkfont" = xno ; then
2009-07-16 22:22:02 +00:00
grub_mkfont_excuse="explicitly disabled"
2009-07-16 16:37:18 +00:00
fi
2013-08-22 15:00:59 +00:00
unset ac_cv_header_ft2build_h
2010-02-09 13:09:08 +00:00
if test x"$grub_mkfont_excuse" = x ; then
# Check for freetype libraries.
2018-01-30 21:59:09 +00:00
PKG_CHECK_MODULES([FREETYPE], [freetype2], [
SAVED_CPPFLAGS="$CPPFLAGS"
SAVED_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
LIBS="$LIBS $FREETYPE_LIBS"
AC_CHECK_HEADERS([ft2build.h], [],
[grub_mkfont_excuse=["need freetype2 headers"]])
AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Load_Glyph])], [],
[grub_mkfont_excuse=["freetype2 library unusable"]])
CPPFLAGS="$SAVED_CPPFLAGS"
LIBS="$SAVED_LIBS"
], [grub_mkfont_excuse=["need freetype2 library"]])
2010-02-09 13:09:08 +00:00
fi
2009-07-16 16:37:18 +00:00
if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then
2013-12-20 16:09:43 +00:00
AC_MSG_ERROR([grub-mkfont was explicitly requested but can't be compiled ($grub_mkfont_excuse)])
2009-07-16 16:37:18 +00:00
fi
if test x"$grub_mkfont_excuse" = x ; then
enable_grub_mkfont=yes
else
enable_grub_mkfont=no
fi
2009-01-13 16:34:26 +00:00
AC_SUBST([enable_grub_mkfont])
2013-08-14 08:56:55 +00:00
SAVED_CC="$CC"
2013-08-22 16:56:00 +00:00
SAVED_CPP="$CPP"
2013-08-14 08:56:55 +00:00
SAVED_CFLAGS="$CFLAGS"
SAVED_CPPFLAGS="$CPPFLAGS"
2014-01-18 15:50:54 +00:00
SAVED_LDFLAGS="$LDFLAGS"
2013-08-14 08:56:55 +00:00
CC="$BUILD_CC"
2013-08-22 16:56:00 +00:00
CPP="$BUILD_CPP"
2013-08-14 08:56:55 +00:00
CFLAGS="$BUILD_CFLAGS"
2013-08-22 15:00:59 +00:00
CPPFLAGS="$BUILD_CPPFLAGS"
2014-01-18 15:50:54 +00:00
LDFLAGS="$BUILD_LDFAGS"
2013-08-22 15:00:59 +00:00
unset ac_cv_c_bigendian
unset ac_cv_header_ft2build_h
AC_COMPUTE_INT([BUILD_SIZEOF_VOID_P], [sizeof (void *)])
AC_COMPUTE_INT([BUILD_SIZEOF_LONG], [sizeof (long)])
AC_C_BIGENDIAN([BUILD_WORDS_BIGENDIAN=1], [BUILD_WORDS_BIGENDIAN=0], [BUILD_WORDS_BIGENDIAN=err], [BUILD_WORDS_BIGENDIAN=err])
if test x$BUILD_WORDS_BIGENDIAN = xerr ; then
AC_MSG_ERROR([couldnt determine build endianness])
fi
AC_SUBST([BUILD_SIZEOF_LONG])
AC_SUBST([BUILD_SIZEOF_VOID_P])
AC_SUBST([BUILD_WORDS_BIGENDIAN])
2012-02-23 16:21:38 +00:00
2013-08-14 08:56:55 +00:00
if test x"$grub_build_mkfont_excuse" = x ; then
# Check for freetype libraries.
2018-01-30 21:59:09 +00:00
SAVED_PKG_CONFIG="$PKG_CONFIG"
test -z "$BUILD_PKG_CONFIG" || PKG_CONFIG="$BUILD_PKG_CONFIG"
PKG_CHECK_MODULES([BUILD_FREETYPE], [freetype2], [
SAVED_CPPFLAGS_2="$CPPFLAGS"
SAVED_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS $BUILD_FREETYPE_CFLAGS"
LIBS="$LIBS $BUILD_FREETYPE_LIBS"
AC_CHECK_HEADERS([ft2build.h], [],
[grub_build_mkfont_excuse=["need freetype2 headers"]])
AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Load_Glyph])], [],
[grub_build_mkfont_excuse=["freetype2 library unusable"]])
LIBS="$SAVED_LIBS"
CPPFLAGS="$SAVED_CPPFLAGS_2"
], [grub_build_mkfont_excuse=["need freetype2 library"]])
PKG_CONFIG="$SAVED_PKG_CONFIG"
2013-08-14 08:56:55 +00:00
fi
if test x"$enable_build_grub_mkfont" = xyes && test x"$grub_build_mkfont_excuse" != x ; then
2013-12-20 16:09:43 +00:00
AC_MSG_ERROR([build-grub-mkfont was explicitly requested but can't be compiled ($grub_build_mkfont_excuse)])
2013-08-14 08:56:55 +00:00
fi
if test x"$grub_build_mkfont_excuse" = x ; then
enable_build_grub_mkfont=yes
else
enable_build_grub_mkfont=no
2012-02-23 16:21:38 +00:00
fi
2016-11-09 21:26:43 +00:00
if test x"$enable_build_grub_mkfont" = xno && ( test "x$platform" = xqemu || test "x$platform" = xloongson || test "x$platform" = xqemu_mips || test "x$platform" = xcoreboot ); then
2013-12-20 16:09:43 +00:00
if test x"$grub_build_mkfont_excuse" = x ; then
2016-11-09 21:26:43 +00:00
AC_MSG_ERROR([qemu, coreboot and loongson ports need build-time grub-mkfont])
2013-12-20 16:09:43 +00:00
else
2016-11-09 21:26:43 +00:00
AC_MSG_ERROR([qemu, coreboot and loongson ports need build-time grub-mkfont ($grub_build_mkfont_excuse)])
2013-12-20 16:09:43 +00:00
fi
2013-08-14 08:56:55 +00:00
fi
CC="$SAVED_CC"
2013-08-22 16:56:00 +00:00
CPP="$SAVED_CPP"
2013-08-14 08:56:55 +00:00
CFLAGS="$SAVED_CFLAGS"
CPPFLAGS="$SAVED_CPPFLAGS"
2014-01-18 15:50:54 +00:00
LDFLAGS="$SAVED_LDFLAGS"
2013-08-14 08:56:55 +00:00
DJVU_FONT_SOURCE=
starfield_excuse=
2012-02-23 16:21:38 +00:00
2013-11-12 21:44:01 +00:00
AC_ARG_ENABLE([grub-themes],
[AS_HELP_STRING([--enable-grub-themes],
[build and install GRUB themes (default=guessed)])])
if test x"$enable_grub_themes" = xno ; then
starfield_excuse="explicitly disabled"
fi
if test x"$starfield_excuse" = x && test x"$enable_build_grub_mkfont" = xno ; then
2013-08-16 12:54:01 +00:00
starfield_excuse="No build-time grub-mkfont"
fi
2012-05-24 22:28:43 +00:00
if test x"$starfield_excuse" = x; then
2012-02-23 16:21:38 +00:00
for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
2014-01-21 15:29:33 +00:00
for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype; do
2012-02-23 16:21:38 +00:00
if test -f "$dir/DejaVuSans.$ext"; then
DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext"
break 2
fi
done
done
if test "x$DJVU_FONT_SOURCE" = x; then
starfield_excuse="No DejaVu found"
fi
fi
2013-11-12 21:44:01 +00:00
if test x"$enable_grub_themes" = xyes && test x"$starfield_excuse" != x; then
2013-12-20 16:09:43 +00:00
AC_MSG_ERROR([themes were explicitly requested but requirements are not satisfied ($starfield_excuse)])
2013-11-12 21:44:01 +00:00
fi
2012-02-23 16:21:38 +00:00
AC_SUBST([DJVU_FONT_SOURCE])
2013-08-14 08:56:55 +00:00
FONT_SOURCE=
for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont /usr/share/fonts/uni /usr/share/fonts/truetype/unifont /usr/share/fonts/misc; do
if test -f "$dir/unifont.$ext"; then
2013-12-07 10:46:46 +00:00
md5="$(md5sum "$dir/unifont.$ext"|awk '{ print $1; }')"
# PCF and BDF from version 6.3 isn't hanled properly by libfreetype.
if test "$md5" = 0a54834d2788c83886a3e1785a6a1e61 || test "$md5" = 28f2565c7a41d8d407e2551159385edb || test "$md5" = dae5e588461b3b92b87b6ffee734f936 || test "$md5" = 4a3d687aa5bb329ed05f4263a1016791 ; then
2014-09-07 19:47:43 +00:00
continue
2013-12-07 10:46:46 +00:00
fi
2013-08-14 08:56:55 +00:00
FONT_SOURCE="$dir/unifont.$ext"
break 2
fi
done
done
2013-08-16 12:54:01 +00:00
if test x"$enable_build_grub_mkfont" = xno ; then
FONT_SOURCE=
fi
2016-11-09 21:26:43 +00:00
if test "x$FONT_SOURCE" = x && ( test "x$platform" = xqemu || test "x$platform" = xloongson || test "x$platform" = xqemu_mips || test "x$platform" = xcoreboot ); then
2013-12-20 16:09:43 +00:00
if test x"$grub_build_mkfont_excuse" = x ; then
2016-11-09 21:26:43 +00:00
AC_MSG_ERROR([qemu, coreboot and loongson ports need unifont])
2013-12-20 16:09:43 +00:00
else
2016-11-09 21:26:43 +00:00
AC_MSG_ERROR([qemu, coreboot and loongson ports need unifont ($grub_build_mkfont_excuse)])
2013-12-20 16:09:43 +00:00
fi
2013-08-14 08:56:55 +00:00
fi
AC_SUBST([FONT_SOURCE])
2013-08-22 15:00:59 +00:00
if test x"$FONT_SOURCE" = x && test x"$DJVU_FONT_SOURCE" = x && test x"$grub_build_mkfont_excuse" = x; then
2013-08-14 08:56:55 +00:00
grub_build_mkfont_excuse="no fonts"
fi
2011-04-08 09:43:12 +00:00
AC_ARG_ENABLE([grub-mount],
[AS_HELP_STRING([--enable-grub-mount],
[build and install the `grub-mount' utility (default=guessed)])])
if test x"$enable_grub_mount" = xno ; then
grub_mount_excuse="explicitly disabled"
2011-01-08 18:51:08 +00:00
fi
2011-04-08 09:43:12 +00:00
if test x"$grub_mount_excuse" = x ; then
2011-01-08 18:51:08 +00:00
AC_CHECK_LIB([fuse], [fuse_main_real], [],
2011-04-08 09:43:12 +00:00
[grub_mount_excuse="need FUSE library"])
2011-01-08 18:51:08 +00:00
fi
2011-04-08 09:43:12 +00:00
if test x"$grub_mount_excuse" = x ; then
2011-01-08 18:51:08 +00:00
# Check for fuse headers.
SAVED_CPPFLAGS="$CPPFLAGS"
2015-01-26 08:35:44 +00:00
CPPFLAGS="$CPPFLAGS -DFUSE_USE_VERSION=26"
2011-01-08 18:51:08 +00:00
AC_CHECK_HEADERS([fuse/fuse.h], [],
2011-04-08 09:43:12 +00:00
[grub_mount_excuse=["need FUSE headers"]])
2011-01-08 18:51:08 +00:00
CPPFLAGS="$SAVED_CPPFLAGS"
fi
2011-04-08 09:43:12 +00:00
if test x"$enable_grub_mount" = xyes && test x"$grub_mount_excuse" != x ; then
2013-12-20 16:09:43 +00:00
AC_MSG_ERROR([grub-mount was explicitly requested but can't be compiled ($grub_mount_excuse)])
2011-01-08 18:51:08 +00:00
fi
2011-04-08 09:43:12 +00:00
if test x"$grub_mount_excuse" = x ; then
enable_grub_mount=yes
2011-01-08 18:51:08 +00:00
else
2011-04-08 09:43:12 +00:00
enable_grub_mount=no
2011-01-08 18:51:08 +00:00
fi
2011-04-08 09:43:12 +00:00
AC_SUBST([enable_grub_mount])
2011-01-08 18:51:08 +00:00
2010-01-25 17:47:51 +00:00
AC_ARG_ENABLE([device-mapper],
[AS_HELP_STRING([--enable-device-mapper],
[enable Linux device-mapper support (default=guessed)])])
if test x"$enable_device_mapper" = xno ; then
device_mapper_excuse="explicitly disabled"
fi
2011-01-08 16:01:38 +00:00
if test x"$device_mapper_excuse" = x ; then
# Check for device-mapper header.
AC_CHECK_HEADER([libdevmapper.h], [],
[device_mapper_excuse="need libdevmapper header"])
fi
2010-01-25 17:47:51 +00:00
if test x"$device_mapper_excuse" = x ; then
# Check for device-mapper library.
2010-09-02 22:53:41 +00:00
AC_CHECK_LIB([devmapper], [dm_task_create], [],
2010-01-25 17:47:51 +00:00
[device_mapper_excuse="need devmapper library"])
fi
2010-09-02 22:53:41 +00:00
if test x"$device_mapper_excuse" = x ; then
# Check for device-mapper library.
AC_CHECK_LIB([devmapper], [dm_log_with_errno_init],
[],
[device_mapper_excuse="need devmapper library"])
fi
if test x"$device_mapper_excuse" = x ; then
2014-09-07 19:47:43 +00:00
LIBDEVMAPPER="-ldevmapper"
2010-09-02 22:53:41 +00:00
AC_DEFINE([HAVE_DEVICE_MAPPER], [1],
[Define to 1 if you have the devmapper library.])
fi
2010-08-18 14:55:16 +00:00
AC_SUBST([LIBDEVMAPPER])
2010-08-17 14:11:43 +00:00
2011-03-26 11:59:02 +00:00
LIBGEOM=
if test x$host_kernel = xkfreebsd; then
AC_CHECK_LIB([geom], [geom_gettree], [],
[AC_MSG_ERROR([Your platform requires libgeom])])
LIBGEOM="-lgeom"
fi
AC_SUBST([LIBGEOM])
2013-11-11 21:47:48 +00:00
AC_ARG_ENABLE([liblzma],
[AS_HELP_STRING([--enable-liblzma],
[enable liblzma integration (default=guessed)])])
if test x"$enable_liblzma" = xno ; then
liblzma_excuse="explicitly disabled"
fi
if test x"$liblzma_excuse" = x ; then
2010-09-21 19:35:46 +00:00
AC_CHECK_LIB([lzma], [lzma_code],
2013-11-11 21:47:48 +00:00
[],[liblzma_excuse="need lzma library"])
fi
if test x"$liblzma_excuse" = x ; then
AC_CHECK_HEADER([lzma.h], [], [liblzma_excuse="need lzma header"])
fi
if test x"$enable_liblzma" = xyes && test x"$liblzma_excuse" != x ; then
2013-12-20 16:09:43 +00:00
AC_MSG_ERROR([liblzma support was explicitly requested but requirements are not satisfied ($liblzma_excuse)])
2013-11-11 21:47:48 +00:00
fi
if test x"$liblzma_excuse" = x ; then
LIBLZMA="-llzma"
AC_DEFINE([USE_LIBLZMA], [1],
[Define to 1 if you have the LZMA library.])
fi
2010-09-21 19:35:46 +00:00
AC_SUBST([LIBLZMA])
2012-02-26 23:57:48 +00:00
AC_ARG_ENABLE([libzfs],
[AS_HELP_STRING([--enable-libzfs],
[enable libzfs integration (default=guessed)])])
if test x"$enable_libzfs" = xno ; then
libzfs_excuse="explicitly disabled"
fi
2010-08-19 11:24:00 +00:00
2012-02-26 23:57:48 +00:00
if test x"$libzfs_excuse" = x ; then
# Only check for system headers if libzfs support has not been disabled.
AC_CHECK_HEADERS(libzfs.h libnvpair.h)
fi
if test x"$libzfs_excuse" = x ; then
AC_CHECK_LIB([zfs], [libzfs_init],
[],
[libzfs_excuse="need zfs library"])
fi
if test x"$libzfs_excuse" = x ; then
2013-10-15 13:01:01 +00:00
AC_CHECK_LIB([nvpair], [nvlist_lookup_string],
2012-02-26 23:57:48 +00:00
[],
[libzfs_excuse="need nvpair library"])
fi
if test x"$enable_libzfs" = xyes && test x"$libzfs_excuse" != x ; then
2013-12-20 16:09:43 +00:00
AC_MSG_ERROR([libzfs support was explicitly requested but requirements are not satisfied ($libzfs_excuse)])
2012-02-26 23:57:48 +00:00
fi
if test x"$libzfs_excuse" = x ; then
# We need both libzfs and libnvpair for a successful build.
LIBZFS="-lzfs"
AC_DEFINE([HAVE_LIBZFS], [1],
[Define to 1 if you have the ZFS library.])
LIBNVPAIR="-lnvpair"
AC_DEFINE([HAVE_LIBNVPAIR], [1],
[Define to 1 if you have the NVPAIR library.])
fi
AC_SUBST([LIBZFS])
2010-08-19 11:24:00 +00:00
AC_SUBST([LIBNVPAIR])
2010-09-03 01:26:22 +00:00
LIBS=""
2010-08-17 14:11:43 +00:00
AC_SUBST([FONT_SOURCE])
AS_IF([test x$target_cpu = xi386 -a x$platform = xqemu],
[AC_SUBST([GRUB_BOOT_MACHINE_LINK_ADDR], 0xffe00)])
2010-01-25 17:47:51 +00:00
2010-09-19 20:22:43 +00:00
AC_SUBST(HAVE_ASM_USCORE)
AC_SUBST(BSS_START_SYMBOL)
AC_SUBST(END_SYMBOL)
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
2013-11-07 17:21:22 +00:00
AC_ARG_ENABLE([werror],
[AS_HELP_STRING([--disable-werror],
[do not use -Werror when building GRUB])])
if test x"$enable_werror" != xno ; then
TARGET_CFLAGS="$TARGET_CFLAGS -Werror"
HOST_CFLAGS="$HOST_CFLAGS -Werror"
fi
TARGET_CPP="$TARGET_CC -E"
TARGET_CCAS=$TARGET_CC
2015-02-20 20:30:34 +00:00
# Includes which include make-time substitutions. They must come last
# as to avoid executing top_builddir in shell.
HOST_CPPFLAGS="$HOST_CPPFLAGS -I\$(top_builddir)/include"
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(top_srcdir)/include"
TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(top_builddir)/include"
2013-11-07 17:21:22 +00:00
GRUB_TARGET_CPU="${target_cpu}"
GRUB_PLATFORM="${platform}"
AC_SUBST(GRUB_TARGET_CPU)
AC_SUBST(GRUB_PLATFORM)
AC_SUBST(TARGET_OBJCONV)
AC_SUBST(TARGET_CPP)
AC_SUBST(TARGET_CCAS)
AC_SUBST(TARGET_OBJ2ELF)
AC_SUBST(TARGET_MODULE_FORMAT)
2013-12-24 13:47:44 +00:00
AC_SUBST(TARGET_CC_VERSION)
2013-11-07 17:21:22 +00:00
AC_SUBST(TARGET_CFLAGS)
AC_SUBST(TARGET_LDFLAGS)
AC_SUBST(TARGET_CPPFLAGS)
AC_SUBST(TARGET_CCASFLAGS)
AC_SUBST(TARGET_IMG_LDFLAGS)
AC_SUBST(TARGET_IMG_CFLAGS)
AC_SUBST(TARGET_IMG_BASE_LDOPT)
2013-11-14 22:17:18 +00:00
AC_SUBST(TARGET_APPLE_LINKER)
2013-11-07 17:21:22 +00:00
AC_SUBST(HOST_CFLAGS)
AC_SUBST(HOST_LDFLAGS)
AC_SUBST(HOST_CPPFLAGS)
AC_SUBST(HOST_CCASFLAGS)
AC_SUBST(BUILD_LIBM)
2010-08-17 14:11:43 +00:00
#
# Automake conditionals
#
2010-05-06 06:04:04 +00:00
2014-09-23 11:06:30 +00:00
AM_CONDITIONAL([COND_real_platform], [test x$platform != xnone])
2010-08-17 14:11:43 +00:00
AM_CONDITIONAL([COND_emu], [test x$platform = xemu])
AM_CONDITIONAL([COND_i386_pc], [test x$target_cpu = xi386 -a x$platform = xpc])
AM_CONDITIONAL([COND_i386_efi], [test x$target_cpu = xi386 -a x$platform = xefi])
2010-08-31 19:47:26 +00:00
AM_CONDITIONAL([COND_ia64_efi], [test x$target_cpu = xia64 -a x$platform = xefi])
2010-08-17 14:11:43 +00:00
AM_CONDITIONAL([COND_i386_qemu], [test x$target_cpu = xi386 -a x$platform = xqemu])
AM_CONDITIONAL([COND_i386_ieee1275], [test x$target_cpu = xi386 -a x$platform = xieee1275])
AM_CONDITIONAL([COND_i386_coreboot], [test x$target_cpu = xi386 -a x$platform = xcoreboot])
AM_CONDITIONAL([COND_i386_multiboot], [test x$target_cpu = xi386 -a x$platform = xmultiboot])
AM_CONDITIONAL([COND_x86_64_efi], [test x$target_cpu = xx86_64 -a x$platform = xefi])
2013-11-09 20:29:11 +00:00
AM_CONDITIONAL([COND_i386_xen], [test x$target_cpu = xi386 -a x$platform = xxen])
2018-12-07 12:11:48 +00:00
AM_CONDITIONAL([COND_i386_xen_pvh], [test x$target_cpu = xi386 -a x$platform = xxen_pvh])
2013-11-09 20:29:11 +00:00
AM_CONDITIONAL([COND_x86_64_xen], [test x$target_cpu = xx86_64 -a x$platform = xxen])
2011-05-17 20:48:20 +00:00
AM_CONDITIONAL([COND_mips_loongson], [test x$target_cpu = xmipsel -a x$platform = xloongson])
AM_CONDITIONAL([COND_mips_qemu_mips], [test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")" -a x$platform = xqemu_mips])
2013-04-25 20:42:35 +00:00
AM_CONDITIONAL([COND_mips_arc], [test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")" -a x$platform = xarc])
2010-08-17 14:11:43 +00:00
AM_CONDITIONAL([COND_sparc64_ieee1275], [test x$target_cpu = xsparc64 -a x$platform = xieee1275])
2013-12-09 23:05:28 +00:00
AM_CONDITIONAL([COND_sparc64_emu], [test x$target_cpu = xsparc64 -a x$platform = xemu])
2010-08-17 14:11:43 +00:00
AM_CONDITIONAL([COND_powerpc_ieee1275], [test x$target_cpu = xpowerpc -a x$platform = xieee1275])
2011-05-17 20:48:20 +00:00
AM_CONDITIONAL([COND_mips], [test x$target_cpu = xmips -o x$target_cpu = xmipsel])
2012-06-06 10:36:33 +00:00
AM_CONDITIONAL([COND_mipsel], [test x$target_cpu = xmipsel])
AM_CONDITIONAL([COND_mipseb], [test x$target_cpu = xmips])
2013-04-07 00:41:07 +00:00
AM_CONDITIONAL([COND_arm], [test x$target_cpu = xarm ])
AM_CONDITIONAL([COND_arm_uboot], [test x$target_cpu = xarm -a x$platform = xuboot])
2017-05-08 18:53:28 +00:00
AM_CONDITIONAL([COND_arm_coreboot], [test x$target_cpu = xarm -a x$platform = xcoreboot])
2013-04-07 00:41:07 +00:00
AM_CONDITIONAL([COND_arm_efi], [test x$target_cpu = xarm -a x$platform = xefi])
2013-11-16 19:52:55 +00:00
AM_CONDITIONAL([COND_arm64], [test x$target_cpu = xarm64 ])
AM_CONDITIONAL([COND_arm64_efi], [test x$target_cpu = xarm64 -a x$platform = xefi])
2019-02-12 10:31:07 +00:00
AM_CONDITIONAL([COND_riscv32], [test x$target_cpu = xriscv32 ])
AM_CONDITIONAL([COND_riscv64], [test x$target_cpu = xriscv64 ])
AM_CONDITIONAL([COND_riscv32_efi], [test x$target_cpu = xriscv32 -a x$platform = xefi])
AM_CONDITIONAL([COND_riscv64_efi], [test x$target_cpu = xriscv64 -a x$platform = xefi])
2010-08-23 07:53:56 +00:00
2013-12-24 16:47:27 +00:00
AM_CONDITIONAL([COND_HOST_HURD], [test x$host_kernel = xhurd])
AM_CONDITIONAL([COND_HOST_LINUX], [test x$host_kernel = xlinux])
AM_CONDITIONAL([COND_HOST_NETBSD], [test x$host_kernel = xnetbsd])
2010-08-23 07:53:56 +00:00
AM_CONDITIONAL([COND_HOST_WINDOWS], [test x$host_kernel = xwindows])
2013-12-24 16:47:27 +00:00
AM_CONDITIONAL([COND_HOST_KFREEBSD], [test x$host_kernel = xkfreebsd])
AM_CONDITIONAL([COND_HOST_XNU], [test x$host_kernel = xxnu])
AM_CONDITIONAL([COND_HOST_ILLUMOS], [test x$host_kernel = xillumos])
2010-06-07 11:53:54 +00:00
2010-08-17 14:11:43 +00:00
AM_CONDITIONAL([COND_MAN_PAGES], [test x$cross_compiling = xno -a x$HELP2MAN != x])
AM_CONDITIONAL([COND_GRUB_EMU_SDL], [test x$enable_grub_emu_sdl = xyes])
AM_CONDITIONAL([COND_GRUB_EMU_PCI], [test x$enable_grub_emu_pci = xyes])
AM_CONDITIONAL([COND_GRUB_MKFONT], [test x$enable_grub_mkfont = xyes])
2011-04-08 09:43:12 +00:00
AM_CONDITIONAL([COND_GRUB_MOUNT], [test x$enable_grub_mount = xyes])
2010-08-17 14:11:43 +00:00
AM_CONDITIONAL([COND_HAVE_FONT_SOURCE], [test x$FONT_SOURCE != x])
2013-12-04 09:25:53 +00:00
if test x$FONT_SOURCE != x ; then
HAVE_FONT_SOURCE=1
else
HAVE_FONT_SOURCE=0
fi
AC_SUBST(HAVE_FONT_SOURCE)
2013-11-14 22:17:18 +00:00
AM_CONDITIONAL([COND_APPLE_LINKER], [test x$TARGET_APPLE_LINKER = x1])
2010-08-17 14:11:43 +00:00
AM_CONDITIONAL([COND_ENABLE_EFIEMU], [test x$enable_efiemu = xyes])
2010-10-06 17:57:01 +00:00
AM_CONDITIONAL([COND_ENABLE_CACHE_STATS], [test x$DISK_CACHE_STATS = x1])
2013-03-19 19:25:09 +00:00
AM_CONDITIONAL([COND_ENABLE_BOOT_TIME_STATS], [test x$BOOT_TIME_STATS = x1])
2009-05-03 06:39:37 +00:00
2013-05-07 09:30:48 +00:00
AM_CONDITIONAL([COND_HAVE_CXX], [test x$HAVE_CXX = xyes])
2010-09-19 20:22:43 +00:00
AM_CONDITIONAL([COND_HAVE_ASM_USCORE], [test x$HAVE_ASM_USCORE = x1])
2012-02-23 16:21:38 +00:00
AM_CONDITIONAL([COND_STARFIELD], [test "x$starfield_excuse" = x])
2013-11-16 19:21:16 +00:00
AM_CONDITIONAL([COND_HAVE_EXEC], [test "x$have_exec" = xy])
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
datarootdir="$(eval echo "$datarootdir")"
grub_libdir="$(eval echo "$libdir")"
grub_localedir="$(eval echo "$localedir")"
grub_datadir="$(eval echo "$datadir")"
grub_sysconfdir="$(eval echo "$sysconfdir")"
AC_DEFINE_UNQUOTED(LOCALEDIR, "$grub_localedir", [Locale dir])
AC_DEFINE_UNQUOTED(GRUB_LIBDIR, "$grub_libdir", [Library dir])
AC_DEFINE_UNQUOTED(GRUB_DATADIR, "$grub_datadir", [Data dir])
AC_DEFINE_UNQUOTED(GRUB_SYSCONFDIR, "$grub_sysconfdir", [Configuration dir])
2010-09-19 20:22:43 +00:00
2002-12-27 08:53:07 +00:00
# Output files.
2014-09-23 11:06:30 +00:00
if test "$platform" != none; then
cpudir="${target_cpu}"
if test x${cpudir} = xmipsel; then
cpudir=mips;
2009-11-23 15:31:54 +00:00
fi
2014-09-23 11:06:30 +00:00
grub_CHECK_LINK_DIR
if test x"$link_dir" = xyes ; then
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$cpudir])
if test "$platform" != emu ; then
AC_CONFIG_LINKS([include/grub/machine:include/grub/$cpudir/$platform])
fi
else
mkdir -p include/grub 2>/dev/null
rm -rf include/grub/cpu
cp -rp $srcdir/include/grub/$cpudir include/grub/cpu 2>/dev/null
if test "$platform" != emu ; then
rm -rf include/grub/machine
cp -rp $srcdir/include/grub/$cpudir/$platform include/grub/machine 2>/dev/null
fi
2009-11-23 15:31:54 +00:00
fi
2014-09-23 11:06:30 +00:00
else
# Just enough to stop the compiler failing with -I$(srcdir)/include.
mkdir -p include 2>/dev/null
2014-09-25 19:59:26 +00:00
rm -rf include/grub/cpu include/grub/machine
2009-03-21 07:48:28 +00:00
fi
2010-08-17 13:33:22 +00:00
2010-05-06 06:04:04 +00:00
AC_CONFIG_FILES([Makefile])
2010-08-17 13:33:22 +00:00
AC_CONFIG_FILES([grub-core/Makefile])
2019-02-27 10:03:55 +00:00
AC_CONFIG_FILES([grub-core/lib/gnulib/Makefile])
2010-09-20 23:09:23 +00:00
AC_CONFIG_FILES([po/Makefile.in])
2010-05-06 06:04:04 +00:00
AC_CONFIG_FILES([docs/Makefile])
2010-09-13 08:29:18 +00:00
AC_CONFIG_FILES([util/bash-completion.d/Makefile])
2002-12-27 08:53:07 +00:00
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
2010-09-19 20:22:43 +00:00
AC_CONFIG_FILES([config.h])
2010-05-06 06:04:04 +00:00
2002-12-27 08:53:07 +00:00
AC_OUTPUT
2009-07-16 16:37:18 +00:00
[
echo "*******************************************************"
echo GRUB2 will be compiled with following components:
echo Platform: "$target_cpu"-"$platform"
2009-11-23 15:31:54 +00:00
if [ x"$platform" = xemu ]; then
2009-11-20 09:28:42 +00:00
if [ x"$grub_emu_sdl_excuse" = x ]; then
echo SDL support for grub-emu: Yes
else
echo SDL support for grub-emu: No "($grub_emu_sdl_excuse)"
fi
2009-10-14 08:36:37 +00:00
if [ x"$grub_emu_pci_excuse" = x ]; then
echo PCI support for grub-emu: Yes
else
echo PCI support for grub-emu: No "($grub_emu_pci_excuse)"
fi
2009-11-23 15:31:54 +00:00
fi
2010-09-02 22:53:41 +00:00
if test x"$device_mapper_excuse" = x ; then
echo With devmapper support: Yes
else
echo With devmapper support: No "($device_mapper_excuse)"
fi
2009-07-16 16:37:18 +00:00
if [ x"$enable_mm_debug" = xyes ]; then
echo With memory debugging: Yes
else
echo With memory debugging: No
fi
2010-10-06 17:57:01 +00:00
if [ x"$enable_cache_stats" = xyes ]; then
echo With disk cache statistics: Yes
else
echo With disk cache statistics: No
fi
2013-03-19 19:25:09 +00:00
if [ x"$enable_boot_time" = xyes ]; then
echo With boot time statistics: Yes
else
echo With boot time statistics: No
fi
2009-07-16 16:37:18 +00:00
if [ x"$efiemu_excuse" = x ]; then
echo efiemu runtime: Yes
else
echo efiemu runtime: No "($efiemu_excuse)"
fi
if [ x"$grub_mkfont_excuse" = x ]; then
echo grub-mkfont: Yes
else
echo grub-mkfont: No "($grub_mkfont_excuse)"
fi
2011-04-08 09:43:12 +00:00
if [ x"$grub_mount_excuse" = x ]; then
2011-01-11 20:20:54 +00:00
echo grub-mount: Yes
2011-01-08 18:51:08 +00:00
else
2011-04-08 09:43:12 +00:00
echo grub-mount: No "($grub_mount_excuse)"
2011-01-08 18:51:08 +00:00
fi
2012-02-23 16:21:38 +00:00
if [ x"$starfield_excuse" = x ]; then
echo starfield theme: Yes
2014-01-21 15:41:11 +00:00
echo With DejaVuSans font from $DJVU_FONT_SOURCE
2012-02-23 16:21:38 +00:00
else
echo starfield theme: No "($starfield_excuse)"
fi
2012-02-26 23:57:48 +00:00
if [ x"$libzfs_excuse" = x ]; then
echo With libzfs support: Yes
else
echo With libzfs support: No "($libzfs_excuse)"
fi
2013-08-22 15:00:59 +00:00
if [ x"$grub_build_mkfont_excuse" = x ]; then
2013-08-14 08:56:55 +00:00
echo Build-time grub-mkfont: Yes
if test "x$FONT_SOURCE" = x ; then
echo "Without unifont"
else
echo "With unifont from $FONT_SOURCE"
fi
2013-05-30 19:51:34 +00:00
else
2013-08-22 15:00:59 +00:00
echo Build-time grub-mkfont: No "($grub_build_mkfont_excuse)"
2013-08-14 08:56:55 +00:00
echo "Without unifont (no build-time grub-mkfont)"
2013-05-30 19:51:34 +00:00
fi
2013-11-11 21:47:48 +00:00
if test x"$liblzma_excuse" != x ; then
echo "Without liblzma (no support for XZ-compressed mips images) ($liblzma_excuse)"
2013-07-11 11:22:11 +00:00
else
echo "With liblzma from $LIBLZMA (support for XZ-compressed mips images)"
fi
2009-07-16 16:37:18 +00:00
echo "*******************************************************"
]