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

@ -145,14 +145,6 @@ if test "$target_cpu"-"$platform" = i386-pc; then
AC_CHECK_HEADERS(lzo/lzo1x.h lzo1x.h)
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.
AC_CHECK_FUNCS(posix_memalign memalign)
@ -265,13 +257,35 @@ CPPFLAGS="$tmp_CPPFLAGS"
LDFLAGS="$tmp_LDFLAGS"
LIBS="$tmp_LIBS"
#
# Check for options.
#
# Memory manager debugging.
AC_ARG_ENABLE([mm-debug],
AS_HELP_STRING([--enable-mm-debug],
[include memory manager debugging]),
[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])])
[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.
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu
include/grub/machine:include/grub/$target_cpu/$platform])