124 lines
3.8 KiB
Text
124 lines
3.8 KiB
Text
# Process this file with autoconf to produce a configure script.
|
|
|
|
# Copyright (C) 2010 Free Software Foundation, Inc.
|
|
#
|
|
# 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.
|
|
|
|
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 build utilities using host
|
|
dnl cross-compiler and grub core and modules using target
|
|
dnl cross-compiler. For this we use nested packages approach, where
|
|
dnl top-level package grub utilities is built with HOSTCC and nested
|
|
dnl package (in grub-core directory) builds with TARGETCC.
|
|
|
|
# NOTE: grub-core/configure.ac must also be updated.
|
|
AC_INIT([GRUB],[1.98],[bug-grub@gnu.org])
|
|
AC_CONFIG_AUX_DIR([.])
|
|
|
|
: ${CFLAGS=""} # We don't want -g -O2
|
|
|
|
# Checks for host and target systems.
|
|
AC_CANONICAL_HOST
|
|
AC_CANONICAL_TARGET
|
|
|
|
AM_INIT_AUTOMAKE()
|
|
AC_PREREQ(2.60)
|
|
AC_CONFIG_SRCDIR([include/grub/dl.h])
|
|
AC_CONFIG_HEADER([config.h])
|
|
|
|
grub_coredir='grub-core'
|
|
AC_SUBST(grub_coredir)
|
|
|
|
grub_utildir='.'
|
|
AC_SUBST(grub_utildir)
|
|
|
|
m4_include([configure.common])
|
|
|
|
# Output files.
|
|
grub_CHECK_LINK_DIR
|
|
if test x"$link_dir" = xyes ; then
|
|
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu])
|
|
mkdir -p grub-core/lib
|
|
cp -rp $srcdir/grub-core/lib/$target_cpu grub-core/lib/target_cpu
|
|
if test "$platform" != emu ; then
|
|
AC_CONFIG_LINKS([include/grub/machine:include/grub/$target_cpu/$platform])
|
|
fi
|
|
else
|
|
mkdir -p include/grub 2>/dev/null
|
|
rm -rf include/grub/cpu
|
|
cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null
|
|
cp -rp $srcdir/grub-core/lib/$target_cpu grub-core/lib/target_cpu 2>/dev/null
|
|
if test "$platform" != emu ; then
|
|
rm -rf include/grub/machine
|
|
cp -rp $srcdir/grub-core/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
|
|
fi
|
|
fi
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
AC_CONFIG_FILES([grub-core/Makefile])
|
|
AC_CONFIG_FILES([po/Makefile])
|
|
AC_CONFIG_FILES([docs/Makefile])
|
|
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
|
|
|
|
AC_OUTPUT
|
|
[
|
|
echo "*******************************************************"
|
|
echo GRUB2 will be compiled with following components:
|
|
echo Platform: "$target_cpu"-"$platform"
|
|
if [ x"$platform" = xemu ]; then
|
|
if [ x"$grub_emu_usb_excuse" = x ]; then
|
|
echo USB support for grub-emu: Yes
|
|
else
|
|
echo USB support for grub-emu: No "($grub_emu_usb_excuse)"
|
|
fi
|
|
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
|
|
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
|
|
fi
|
|
if [ x"$enable_mm_debug" = xyes ]; then
|
|
echo With memory debugging: Yes
|
|
else
|
|
echo With memory debugging: No
|
|
fi
|
|
if [ x"$efiemu_excuse" = x ]; then
|
|
echo efiemu runtime: Yes
|
|
else
|
|
echo efiemu runtime: No "($efiemu_excuse)"
|
|
fi
|
|
if [ x"$grub_fstest_excuse" = x ]; then
|
|
echo grub-fstest: Yes
|
|
else
|
|
echo grub-fstest: No "($grub_fstest_excuse)"
|
|
fi
|
|
if [ x"$grub_mkfont_excuse" = x ]; then
|
|
echo grub-mkfont: Yes
|
|
else
|
|
echo grub-mkfont: No "($grub_mkfont_excuse)"
|
|
fi
|
|
echo "*******************************************************"
|
|
]
|