merged in mainline
This commit is contained in:
commit
8622549153
200 changed files with 10823 additions and 2206 deletions
96
configure.ac
96
configure.ac
|
@ -31,7 +31,7 @@ dnl (such as TARGET_CC, TARGET_CFLAGS, etc.) are used for the target
|
|||
dnl type.
|
||||
|
||||
|
||||
AC_INIT([GRUB],[1.97],[bug-grub@gnu.org])
|
||||
AC_INIT([GRUB],[1.98],[bug-grub@gnu.org])
|
||||
AM_INIT_AUTOMAKE()
|
||||
AC_PREREQ(2.60)
|
||||
AC_CONFIG_SRCDIR([include/grub/dl.h])
|
||||
|
@ -51,6 +51,7 @@ fi
|
|||
|
||||
case "$target_cpu" in
|
||||
i[[3456]]86) target_cpu=i386 ;;
|
||||
amd64) target_cpu=x86_64 ;;
|
||||
sparc) target_cpu=sparc64 ;;
|
||||
mipsel|mips64el)
|
||||
target_cpu=mips;
|
||||
|
@ -90,6 +91,7 @@ fi
|
|||
if test -z "$target_alias"; then
|
||||
case "$target_cpu"-"$platform" in
|
||||
x86_64-efi) ;;
|
||||
x86_64-emu) ;;
|
||||
x86_64-*) target_cpu=i386 ;;
|
||||
powerpc64-ieee1275) target_cpu=powerpc ;;
|
||||
esac
|
||||
|
@ -138,9 +140,14 @@ case "$platform" in
|
|||
qemu) machine_CFLAGS="-DGRUB_MACHINE_QEMU=1" ;;
|
||||
pc) machine_CFLAGS="-DGRUB_MACHINE_PCBIOS=1" ;;
|
||||
emu) machine_CFLAGS="-DGRUB_MACHINE_EMU=1" ;;
|
||||
yeeloong) machine_CFLAGS="-DGRUB_MACHINE_MIPS_YEELOONG=1 -DGRUB_MACHINE_MIPS=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
||||
qemu-mips) machine_CFLAGS="-DGRUB_MACHINE_MIPS_QEMU_MIPS=1 -DGRUB_MACHINE_MIPS=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
||||
yeeloong) machine_CFLAGS="-DGRUB_MACHINE_MIPS_YEELOONG=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
||||
qemu-mips) machine_CFLAGS="-DGRUB_MACHINE_MIPS_QEMU_MIPS=1 -DGRUB_MACHINE_MIPS_BONITO=1" ;;
|
||||
esac
|
||||
case "$target_cpu" in
|
||||
mips) machine_CFLAGS="$machine_CFLAGS -DGRUB_MACHINE_MIPS=1" ;;
|
||||
sparc64) machine_CFLAGS="$machine_CFLAGS -DGRUB_MACHINE_SPARC64=1" ;;
|
||||
esac
|
||||
|
||||
CFLAGS="$CFLAGS $machine_CFLAGS"
|
||||
TARGET_ASFLAGS="$TARGET_ASFLAGS $machine_CFLAGS"
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS $machine_CFLAGS"
|
||||
|
@ -226,7 +233,7 @@ AC_HEADER_MAJOR
|
|||
AC_HEADER_DIRENT
|
||||
AC_CHECK_FUNCS(memmove sbrk strdup lstat getuid getgid)
|
||||
AC_CHECK_HEADERS(sys/mkdev.h sys/sysmacros.h malloc.h termios.h sys/types.h)
|
||||
AC_CHECK_HEADERS(unistd.h string.h strings.h sys/stat.h sys/fcntl.h)
|
||||
AC_CHECK_HEADERS(unistd.h string.h strings.h sys/stat.h sys/fcntl.h limits.h)
|
||||
|
||||
#
|
||||
# Check for target programs.
|
||||
|
@ -357,6 +364,7 @@ AC_MSG_RESULT([$TARGET_OBJ2ELF])
|
|||
if test "x$target_m32" = x1; then
|
||||
# Force 32-bit mode.
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -m32"
|
||||
TARGET_ASFLAGS="$TARGET_CFLAGS -m32"
|
||||
TARGET_LDFLAGS="$TARGET_LDFLAGS -m32"
|
||||
TARGET_MODULE_FORMAT="elf32"
|
||||
fi
|
||||
|
@ -364,6 +372,7 @@ fi
|
|||
if test "x$target_m64" = x1; then
|
||||
# Force 64-bit mode.
|
||||
TARGET_CFLAGS="$TARGET_CFLAGS -m64"
|
||||
TARGET_ASFLAGS="$TARGET_ASFLAGS -m64"
|
||||
TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
|
||||
TARGET_MODULE_FORMAT="elf64"
|
||||
fi
|
||||
|
@ -443,18 +452,26 @@ AC_SUBST(TARGET_ASFLAGS)
|
|||
AC_SUBST(TARGET_CPPFLAGS)
|
||||
AC_SUBST(TARGET_LDFLAGS)
|
||||
|
||||
# Check for libgcc symbols (must be performed before we add -nostdlib to LDFLAGS)
|
||||
AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 __trampoline_setup __ucmpdi2 _restgpr_14_x)
|
||||
|
||||
# Set them to their new values for the tests below.
|
||||
CC="$TARGET_CC"
|
||||
if test "x$TARGET_APPLE_CC" = x1 ; then
|
||||
CFLAGS="$TARGET_CFLAGS -nostdlib -Wno-error"
|
||||
else
|
||||
CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100 -Wl,--defsym,abort=main -Wno-error"
|
||||
fi
|
||||
CPPFLAGS="$TARGET_CPPFLAGS"
|
||||
LDFLAGS="$TARGET_LDFLAGS"
|
||||
LIBS=-lgcc
|
||||
|
||||
# Check for libgcc symbols
|
||||
AC_CHECK_FUNCS(__bswapsi2 __bswapdi2 __ashldi3 __ashrdi3 __lshrdi3 __trampoline_setup __ucmpdi2 _restgpr_14_x)
|
||||
|
||||
if test "x$TARGET_APPLE_CC" = x1 ; then
|
||||
CFLAGS="$TARGET_CFLAGS -nostdlib"
|
||||
else
|
||||
CFLAGS="$TARGET_CFLAGS -nostdlib -Wl,--defsym,___main=0x8100"
|
||||
fi
|
||||
CPPFLAGS="$TARGET_CPPFLAGS"
|
||||
LDFLAGS="$TARGET_LDFLAGS"
|
||||
LIBS=""
|
||||
|
||||
# Defined in aclocal.m4.
|
||||
grub_PROG_TARGET_CC
|
||||
|
@ -513,6 +530,21 @@ enable_efiemu=no
|
|||
fi
|
||||
AC_SUBST([enable_efiemu])
|
||||
|
||||
if test "$platform" != emu; then
|
||||
AC_CACHE_CHECK([whether -nostdinc -isystem works], [grub_cv_cc_isystem], [
|
||||
SAVED_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
|
||||
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
|
||||
fi
|
||||
|
||||
# Restore the flags.
|
||||
CC="$tmp_CC"
|
||||
|
@ -536,6 +568,10 @@ 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-sdl],
|
||||
[AS_HELP_STRING([--enable-grub-emu-sdl],
|
||||
[build and install the `grub-emu' debugging utility with SDL 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)])])
|
||||
|
@ -586,6 +622,31 @@ else
|
|||
enable_grub_emu_usb=no
|
||||
fi
|
||||
|
||||
if test x"$enable_grub_emu_sdl" = xno ; then
|
||||
grub_emu_sdl_excuse="explicitely disabled"
|
||||
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]
|
||||
|
||||
[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]
|
||||
|
||||
if test x"enable_grub_emu_sdl" = xyes && test x"$grub_emu_sdl_excuse" != x ; then
|
||||
AC_MSG_ERROR([SDL support for grub-emu was explicitely requested but can't be compiled])
|
||||
fi
|
||||
if test x"$grub_emu_sdl_excuse" = x ; then
|
||||
enable_grub_emu_sdl=yes
|
||||
else
|
||||
enable_grub_emu_sdl=no
|
||||
fi
|
||||
|
||||
if test x"$enable_grub_emu_pci" != xyes ; then
|
||||
grub_emu_pci_excuse="not enabled"
|
||||
fi
|
||||
|
@ -609,9 +670,11 @@ fi
|
|||
if test x"$grub_emu_pci_excuse" = x ; then
|
||||
enable_grub_emu_pci=yes
|
||||
else
|
||||
|
||||
enable_grub_emu_pci=no
|
||||
fi
|
||||
|
||||
AC_SUBST([enable_grub_emu_sdl])
|
||||
AC_SUBST([enable_grub_emu_usb])
|
||||
AC_SUBST([enable_grub_emu_pci])
|
||||
fi
|
||||
|
@ -645,6 +708,16 @@ if test x"$grub_mkfont_excuse" = x ; then
|
|||
freetype_cflags=`freetype-config --cflags`
|
||||
freetype_libs=`freetype-config --libs`
|
||||
fi
|
||||
|
||||
if test x"$grub_mkfont_excuse" = x ; then
|
||||
# Check for freetype libraries.
|
||||
SAVED_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $freetype_cflags"
|
||||
AC_CHECK_HEADERS([ft2build.h], [],
|
||||
[grub_mkfont_excuse=["need freetype2 headers"]])
|
||||
CPPFLAGS="$SAVED_CPPFLAGS"
|
||||
fi
|
||||
|
||||
if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then
|
||||
AC_MSG_ERROR([grub-mkfont was explicitly requested but can't be compiled])
|
||||
fi
|
||||
|
@ -688,6 +761,11 @@ 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue