mainstream merged into pci
This commit is contained in:
commit
0e8489094a
76 changed files with 3897 additions and 4606 deletions
74
configure.ac
74
configure.ac
|
@ -33,7 +33,6 @@ dnl type.
|
|||
|
||||
AC_INIT([GRUB],[1.97],[bug-grub@gnu.org])
|
||||
AM_INIT_AUTOMAKE()
|
||||
AM_GNU_GETTEXT()
|
||||
AC_PREREQ(2.59d)
|
||||
AC_CONFIG_SRCDIR([include/grub/dl.h])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
|
@ -91,6 +90,7 @@ case "$target_cpu"-"$platform" in
|
|||
i386-qemu) ;;
|
||||
powerpc-ieee1275) ;;
|
||||
sparc64-ieee1275) ;;
|
||||
*-emu) ;;
|
||||
*) AC_MSG_ERROR([platform "$platform" is not supported for target CPU "$target_cpu"]) ;;
|
||||
esac
|
||||
|
||||
|
@ -113,6 +113,17 @@ case "$host_os" in
|
|||
cygwin) host_kernel=windows ;;
|
||||
esac
|
||||
|
||||
case "$platform" in
|
||||
coreboot) machine_CFLAGS="-DGRUB_MACHINE_COREBOOT=1" ;;
|
||||
efi) machine_CFLAGS="-DGRUB_MACHINE_EFI=1" ;;
|
||||
ieee1275) machine_CFLAGS="-DGRUB_MACHINE_IEEE1275=1" ;;
|
||||
qemu) machine_CFLAGS="-DGRUB_MACHINE_QEMU=1" ;;
|
||||
pc) machine_CFLAGS="-DGRUB_MACHINE_PCBIOS=1" ;;
|
||||
emu) machine_CFLAGS="-DGRUB_MACHINE_EMU=1" ;;
|
||||
esac
|
||||
CFLAGS="$CFLAGS $machine_CFLAGS"
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS $machine_CFLAGS"
|
||||
|
||||
AC_SUBST(host_cpu)
|
||||
AC_SUBST(host_os)
|
||||
AC_SUBST(host_kernel)
|
||||
|
@ -161,6 +172,7 @@ AC_PROG_CC
|
|||
test "x$GCC" = xyes || AC_MSG_ERROR([GCC is required])
|
||||
|
||||
AC_GNU_SOURCE
|
||||
AM_GNU_GETTEXT
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
# Identify characteristics of the host architecture.
|
||||
|
@ -509,52 +521,40 @@ AC_ARG_ENABLE([mm-debug],
|
|||
[AC_DEFINE([MM_DEBUG], [1],
|
||||
[Define to 1 if you enable memory manager debugging.])])
|
||||
|
||||
AC_ARG_ENABLE([grub-emu],
|
||||
[AS_HELP_STRING([--enable-grub-emu],
|
||||
[build and install the `grub-emu' debugging utility (default=guessed)])])
|
||||
AC_ARG_ENABLE([grub-emu-usb],
|
||||
[AS_HELP_STRING([--enable-grub-emu-usb],
|
||||
[build and install the `grub-emu' debugging utility with USB support (default=guessed)])])
|
||||
|
||||
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)])])
|
||||
|
||||
if test x"$enable_grub_emu" = xno ; then
|
||||
grub_emu_excuse="explicitly disabled"
|
||||
fi
|
||||
|
||||
[# Check for curses libraries.]
|
||||
[if [ x"$grub_emu_excuse" = x ]; then ]
|
||||
if test "$platform" = emu; then
|
||||
missing_ncurses=
|
||||
[# Check for curses libraries.]
|
||||
AC_CHECK_LIB([ncurses], [wgetch], [LIBCURSES="-lncurses"],
|
||||
[AC_CHECK_LIB([curses], [wgetch], [LIBCURSES="-lcurses"],
|
||||
[grub_emu_excuse=["need (n)curses libraries"]])])
|
||||
[missing_ncurses=[true]])])
|
||||
AC_SUBST([LIBCURSES])
|
||||
[fi]
|
||||
[if [ x"$grub_emu_excuse" = x ]; then ]
|
||||
[if [ x"$missing_ncurses" = x ]; then ]
|
||||
[# Check for headers.]
|
||||
AC_CHECK_HEADERS([ncurses/curses.h], [],
|
||||
[AC_CHECK_HEADERS([ncurses.h], [],
|
||||
[AC_CHECK_HEADERS([curses.h], [],
|
||||
[grub_emu_excuse=["need (n)curses headers"]])])])
|
||||
[missing_ncurses=[true]])])])
|
||||
[fi]
|
||||
|
||||
if test x"$enable_grub_emu" = xyes && test x"$grub_emu_excuse" != x ; then
|
||||
AC_MSG_ERROR([grub-emu was explicitly requested but can't be compiled])
|
||||
fi
|
||||
if test x"$grub_emu_excuse" = x ; then
|
||||
enable_grub_emu=yes
|
||||
else
|
||||
enable_grub_emu=no
|
||||
grub_emu_usb_excuse="grub-emu isn't built"
|
||||
fi
|
||||
if test x"$enable_grub_emu_pci" = xyes ; then
|
||||
grub_emu_usb_excuse="conflicts with PCI support"
|
||||
if test x"$missing_ncurses" = xtrue ; then
|
||||
AC_MSG_ERROR([grub-emu can't be compiled without ncurses])
|
||||
fi
|
||||
|
||||
if test x"$enable_grub_emu_usb" = xno ; then
|
||||
grub_emu_usb_excuse="explicitly disabled"
|
||||
fi
|
||||
|
||||
if test x"$enable_grub_emu_pci" = xyes ; then
|
||||
grub_emu_usb_excuse="conflicts with PCI support"
|
||||
fi
|
||||
|
||||
[if [ x"$grub_emu_usb_excuse" = x ]; then
|
||||
# Check for libusb libraries.]
|
||||
AC_CHECK_LIB([usb], [usb_claim_interface], [LIBUSB="-lusb"],
|
||||
|
@ -601,9 +601,9 @@ else
|
|||
enable_grub_emu_pci=no
|
||||
fi
|
||||
|
||||
AC_SUBST([enable_grub_emu])
|
||||
AC_SUBST([enable_grub_emu_usb])
|
||||
AC_SUBST([enable_grub_emu_pci])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([grub-fstest],
|
||||
[AS_HELP_STRING([--enable-grub-fstest],
|
||||
|
@ -651,14 +651,18 @@ AC_SUBST(ASFLAGS)
|
|||
# Output files.
|
||||
grub_CHECK_LINK_DIR
|
||||
if test x"$link_dir" = xyes ; then
|
||||
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu
|
||||
include/grub/machine:include/grub/$target_cpu/$platform])
|
||||
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$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
|
||||
rm -rf include/grub/machine
|
||||
cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
|
||||
if test "$platform" != emu ; then
|
||||
rm -rf include/grub/machine
|
||||
cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh])
|
||||
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
|
||||
|
@ -667,11 +671,7 @@ AC_OUTPUT
|
|||
echo "*******************************************************"
|
||||
echo GRUB2 will be compiled with following components:
|
||||
echo Platform: "$target_cpu"-"$platform"
|
||||
if [ x"$grub_emu_excuse" = x ]; then
|
||||
echo grub-emu: Yes
|
||||
else
|
||||
echo grub-emu: No "($grub_emu_excuse)"
|
||||
fi
|
||||
if [ x"$platform" = xemu ]; then
|
||||
if [ x"$grub_emu_usb_excuse" = x ]; then
|
||||
echo USB support for grub-emu: Yes
|
||||
else
|
||||
|
@ -682,7 +682,7 @@ 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue