2006-12-13 Thomas Schwinge <tschwinge@gnu.org>

* Makefile.in (enable_grub_emu): New variable.
	* configure.ac (--enable-grub-emu): New option.
	Do the checks for (n)curses only if `--enable-grub-emu' is requested.
	* conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
This commit is contained in:
tschwinge 2006-12-13 22:30:19 +00:00
parent a8aa57628e
commit 4fe9862ebb
7 changed files with 50 additions and 12 deletions

View file

@ -1,3 +1,13 @@
2006-12-13 Thomas Schwinge <tschwinge@gnu.org>
* Makefile.in (enable_grub_emu): New variable.
* configure.ac (--enable-grub-emu): New option.
Do the checks for (n)curses only if `--enable-grub-emu' is requested.
* conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
* conf/i386-pc.rmk: Likewise.
* conf/powerpc-ieee1275.rmk: Likewise.
* conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
2006-12-12 Marco Gerards <marco@gnu.org> 2006-12-12 Marco Gerards <marco@gnu.org>
* include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'. * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.

View file

@ -73,6 +73,9 @@ LIBCURSES = @LIBCURSES@
LIBLZO = @LIBLZO@ LIBLZO = @LIBLZO@
YACC = @YACC@ YACC = @YACC@
# Options.
enable_grub_emu = @enable_grub_emu@
### General variables. ### General variables.
RMKFILES = $(addprefix conf/,common.rmk i386-pc.rmk powerpc-ieee1275.rmk \ RMKFILES = $(addprefix conf/,common.rmk i386-pc.rmk powerpc-ieee1275.rmk \

View file

@ -6,7 +6,10 @@ COMMON_LDFLAGS = -melf_i386 -nostdlib
# Utilities. # Utilities.
bin_UTILITIES = grub-mkimage bin_UTILITIES = grub-mkimage
#sbin_UTILITIES = grub-setup grub-emu grub-mkdevicemap grub-probe #sbin_UTILITIES = grub-setup grub-mkdevicemap grub-probe
#ifeq ($(enable_grub_emu), yes)
#sbin_UTILITIES += grub-emu
#endif
# For grub-mkimage. # For grub-mkimage.
grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \ grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \

View file

@ -51,7 +51,10 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genke
# Utilities. # Utilities.
bin_UTILITIES = grub-mkimage bin_UTILITIES = grub-mkimage
sbin_UTILITIES = grub-setup grub-emu grub-mkdevicemap grub-probe sbin_UTILITIES = grub-setup grub-mkdevicemap grub-probe
ifeq ($(enable_grub_emu), yes)
sbin_UTILITIES += grub-emu
endif
# For grub-mkimage. # For grub-mkimage.
grub_mkimage_SOURCES = util/i386/pc/grub-mkimage.c util/misc.c \ grub_mkimage_SOURCES = util/i386/pc/grub-mkimage.c util/misc.c \

View file

@ -26,7 +26,9 @@ pkgdata_PROGRAMS = kernel.elf
# Utilities. # Utilities.
bin_UTILITIES = grub-mkimage bin_UTILITIES = grub-mkimage
ifeq ($(enable_grub_emu), yes)
sbin_UTILITIES = grub-emu sbin_UTILITIES = grub-emu
endif
# For grub-mkimage. # For grub-mkimage.
grub_mkimage_SOURCES = util/powerpc/ieee1275/grub-mkimage.c util/misc.c \ grub_mkimage_SOURCES = util/powerpc/ieee1275/grub-mkimage.c util/misc.c \

View file

@ -29,7 +29,10 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_elf_HEADERS)) config.h genke
pkgdata_PROGRAMS = kernel.elf pkgdata_PROGRAMS = kernel.elf
# Utilities. # Utilities.
#bin_UTILITIES = grub-emu grub-mkimage #bin_UTILITIES = grub-mkimage
#ifeq ($(enable_grub_emu), yes)
#bin_UTILITIES += grub-emu
#endif
# For grub-mkimage. # For grub-mkimage.
grub_mkimage_SOURCES = util/sparc64/ieee1275/grub-mkimage.c util/misc.c \ grub_mkimage_SOURCES = util/sparc64/ieee1275/grub-mkimage.c util/misc.c \

View file

@ -145,14 +145,6 @@ if test "$target_cpu"-"$platform" = i386-pc; then
AC_CHECK_HEADERS(lzo/lzo1x.h lzo1x.h) AC_CHECK_HEADERS(lzo/lzo1x.h lzo1x.h)
fi fi
# Check for curses.
AC_CHECK_LIB(ncurses, wgetch, [LIBCURSES="-lncurses"],
[AC_CHECK_LIB(curses, wgetch, [LIBCURSES="-lcurses"])])
AC_SUBST(LIBCURSES)
# Check for headers.
AC_CHECK_HEADERS(ncurses/curses.h ncurses.h curses.h)
# Check for functions. # Check for functions.
AC_CHECK_FUNCS(posix_memalign memalign) AC_CHECK_FUNCS(posix_memalign memalign)
@ -265,13 +257,35 @@ CPPFLAGS="$tmp_CPPFLAGS"
LDFLAGS="$tmp_LDFLAGS" LDFLAGS="$tmp_LDFLAGS"
LIBS="$tmp_LIBS" LIBS="$tmp_LIBS"
#
# Check for options. # Check for options.
#
# Memory manager debugging.
AC_ARG_ENABLE([mm-debug], AC_ARG_ENABLE([mm-debug],
AS_HELP_STRING([--enable-mm-debug], AS_HELP_STRING([--enable-mm-debug],
[include memory manager debugging]), [include memory manager debugging]),
[AC_DEFINE([MM_DEBUG], [1], [AC_DEFINE([MM_DEBUG], [1],
[Define to 1 if you enable memory manager debugging.])]) [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])])
[if [ x"$enable_grub_emu" = xyes ]; then
# Check for curses libraries.]
AC_CHECK_LIB([ncurses], [wgetch], [LIBCURSES="-lncurses"],
[AC_CHECK_LIB([curses], [wgetch], [LIBCURSES="-lcurses"],
[AC_MSG_ERROR([(n)curses libraries are required to build `grub-emu'])])])
AC_SUBST([LIBCURSES])
[# Check for headers.]
AC_CHECK_HEADERS([ncurses/curses.h], [],
[AC_CHECK_HEADERS([ncurses.h], [],
[AC_CHECK_HEADERS([curses.h], [],
[AC_MSG_ERROR([(n)curses header files are required to build `grub-emu'])])])])
[fi]
AC_SUBST([enable_grub_emu])
# Output files. # Output files.
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu
include/grub/machine:include/grub/$target_cpu/$platform]) include/grub/machine:include/grub/$target_cpu/$platform])