mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 15:22:39 +00:00
81 lines
2.3 KiB
Plaintext
81 lines
2.3 KiB
Plaintext
dnl Configure script for GRUB.
|
|
dnl Copyright 1999 Free Software Foundation, Inc.
|
|
|
|
dnl Permission to use, copy, modify and distribute this software and its
|
|
dnl documentation is hereby granted, provided that both the copyright
|
|
dnl notice and this permission notice appear in all copies of the
|
|
dnl software, derivative works or modified versions, and any portions
|
|
dnl thereof, and that both notices appear in supporting documentation.
|
|
dnl
|
|
dnl THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS
|
|
dnl "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY
|
|
dnl LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
|
|
dnl USE OF THIS SOFTWARE.
|
|
|
|
AC_INIT(stage2/stage2.c)
|
|
dnl Grab the package and version from the top debian/changelog entry.
|
|
AM_INIT_AUTOMAKE(
|
|
esyscmd([sed 's/ .*$//; q' debian/changelog]),
|
|
esyscmd([sed 's/^.*(\(.*\)).*$/\1/; q' debian/changelog]))dnl
|
|
AC_PREREQ(2.12)
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
case "$host_cpu" in
|
|
i[[3456]]86) host_cpu=i386 ;;
|
|
*) AC_MSG_ERROR([unsupported CPU type]) ;;
|
|
esac
|
|
|
|
AC_SUBST(host_cpu)
|
|
AC_SUBST(host_vendor)
|
|
|
|
#
|
|
# Options
|
|
#
|
|
|
|
AC_ARG_ENABLE(maintainer-mode,
|
|
[ --enable-maintainer-mode
|
|
enable the maintainer mode],
|
|
[case "x${enableval}" in
|
|
xyes) maintainermode=yes ;;
|
|
xno) maintainermode=no ;;
|
|
*) AC_MSG_ERROR(invalid value ${enableval} for --enable-maintainer-mode) ;;
|
|
esac],[maintainermode=no])
|
|
AM_CONDITIONAL(GRUB_MAINT, test "x${maintainermode}" = xyes)
|
|
|
|
#
|
|
# Programs
|
|
#
|
|
|
|
AC_CHECK_TOOL(CC, gcc)
|
|
AC_PROG_CC
|
|
AC_PROG_RANLIB
|
|
|
|
# Enforce coding standards.
|
|
CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused"
|
|
|
|
AC_CHECK_TOOL(LD, ld)
|
|
AC_CHECK_TOOL(OBJCOPY, objcopy)
|
|
|
|
# Defined in acinclude.m4.
|
|
grub_ASM_EXT_C
|
|
grub_PROG_OBJCOPY_ABSOLUTE
|
|
if test "x$grub_cv_prog_objcopy_absolute" != xyes; then
|
|
AC_MSG_ERROR([GRUB requires a working absolute objcopy; upgrade your binutils])
|
|
fi
|
|
|
|
grub_ASM_ADDR32
|
|
if test "x$grub_cv_asm_addr32" != xyes; then
|
|
AC_MSG_ERROR([GRUB requires GAS .code16 addr32 support; upgrade your binutils])
|
|
fi
|
|
|
|
# Check for curses libraries.
|
|
AC_CHECK_LIB(ncurses, getch, [GRUB_LIBS="$GRUB_LIBS -lncurses"
|
|
AC_DEFINE(HAVE_LIBCURSES)],
|
|
[AC_CHECK_LIB(curses, getch, [GRUB_LIBS="$GRUB_LIBS -lcurses"
|
|
AC_DEFINE(HAVE_LIBCURSES)])])
|
|
AC_SUBST(GRUB_LIBS)
|
|
|
|
AC_OUTPUT([Makefile stage1/Makefile stage2/Makefile docs/Makefile \
|
|
debian/Makefile grub/Makefile])
|