17c478bd9Sstevel@tonic-gatednl Configure script for GRUB. 2*1b8adde7SWilliam Kucharskidnl Copyright 1999,2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc. 37c478bd9Sstevel@tonic-gate 47c478bd9Sstevel@tonic-gatednl Permission to use, copy, modify and distribute this software and its 57c478bd9Sstevel@tonic-gatednl documentation is hereby granted, provided that both the copyright 67c478bd9Sstevel@tonic-gatednl notice and this permission notice appear in all copies of the 77c478bd9Sstevel@tonic-gatednl software, derivative works or modified versions, and any portions 87c478bd9Sstevel@tonic-gatednl thereof, and that both notices appear in supporting documentation. 97c478bd9Sstevel@tonic-gatednl 107c478bd9Sstevel@tonic-gatednl THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS 117c478bd9Sstevel@tonic-gatednl "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY 127c478bd9Sstevel@tonic-gatednl LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE 137c478bd9Sstevel@tonic-gatednl USE OF THIS SOFTWARE. 147c478bd9Sstevel@tonic-gate 157c478bd9Sstevel@tonic-gateAC_PREREQ(2.57) 16*1b8adde7SWilliam KucharskiAC_INIT([GRUB], [0.97], [bug-grub@gnu.org]) 177c478bd9Sstevel@tonic-gateAC_CONFIG_SRCDIR([stage2/stage2.c]) 187c478bd9Sstevel@tonic-gateAC_CONFIG_HEADER([config.h]) 197c478bd9Sstevel@tonic-gateAM_INIT_AUTOMAKE 207c478bd9Sstevel@tonic-gate 217c478bd9Sstevel@tonic-gateAC_CANONICAL_HOST 227c478bd9Sstevel@tonic-gate 237c478bd9Sstevel@tonic-gatecase "$host_cpu" in 247c478bd9Sstevel@tonic-gatei[[3456]]86) host_cpu=i386 ;; 257c478bd9Sstevel@tonic-gatex86_64) host_cpu=x86_64 ;; 267c478bd9Sstevel@tonic-gate*) AC_MSG_ERROR([unsupported CPU type]) ;; 277c478bd9Sstevel@tonic-gateesac 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gateAC_SUBST(host_cpu) 307c478bd9Sstevel@tonic-gateAC_SUBST(host_vendor) 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate# 337c478bd9Sstevel@tonic-gate# Options 347c478bd9Sstevel@tonic-gate# 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gateAM_MAINTAINER_MODE 377c478bd9Sstevel@tonic-gateif test "x$enable_maintainer_mode" = xyes; then 387c478bd9Sstevel@tonic-gate AC_PATH_PROG(PERL,perl) 397c478bd9Sstevel@tonic-gate if test -z "$PERL"; then 407c478bd9Sstevel@tonic-gate AC_MSG_ERROR([perl not found]) 417c478bd9Sstevel@tonic-gate fi 427c478bd9Sstevel@tonic-gatefi 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate# This should be checked before AC_PROG_CC 457c478bd9Sstevel@tonic-gateif test "x$CFLAGS" = x; then 467c478bd9Sstevel@tonic-gate default_CFLAGS=yes 477c478bd9Sstevel@tonic-gatefi 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gateif test "x$host_cpu" = xx86_64; then 507c478bd9Sstevel@tonic-gate CFLAGS="-m32 $CFLAGS" 517c478bd9Sstevel@tonic-gatefi 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gate# 547c478bd9Sstevel@tonic-gate# Programs 557c478bd9Sstevel@tonic-gate# 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gateAC_CHECK_TOOL(CC, gcc) 587c478bd9Sstevel@tonic-gateAC_PROG_CC 597c478bd9Sstevel@tonic-gate# We need this for older versions of Autoconf. 607c478bd9Sstevel@tonic-gate_AM_DEPENDENCIES(CC) 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gatednl Because recent automake complains about AS, set it here. 637c478bd9Sstevel@tonic-gateCCAS="$CC" 647c478bd9Sstevel@tonic-gateAC_SUBST(CCAS) 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gateAC_ARG_WITH(binutils, 677c478bd9Sstevel@tonic-gate [ --with-binutils=DIR search the directory DIR to find binutils]) 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gateif test "x$with_binutils" != x; then 707c478bd9Sstevel@tonic-gatednl AC_PATH_TOOL is not seen in autoconf 2.13, so use AC_PATH_PROG 717c478bd9Sstevel@tonic-gatednl instead for now. It is preferable when you cross-compile GRUB. 727c478bd9Sstevel@tonic-gatednl AC_PATH_TOOL(RANLIB, ranlib, :, "$with_binutils:$PATH") 737c478bd9Sstevel@tonic-gate AC_PATH_PROG(RANLIB, ranlib, :, "$with_binutils:$PATH") 747c478bd9Sstevel@tonic-gateelse 757c478bd9Sstevel@tonic-gate AC_PROG_RANLIB 767c478bd9Sstevel@tonic-gatefi 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate# optimization flags 797c478bd9Sstevel@tonic-gateif test "x$ac_cv_prog_gcc" = xyes; then 807c478bd9Sstevel@tonic-gate if test "x$default_CFLAGS" = xyes; then 817c478bd9Sstevel@tonic-gate # Autoconf may set CFLAGS to -O2 and/or -g. So eliminate them. 827c478bd9Sstevel@tonic-gate CFLAGS="`echo $CFLAGS | sed -e 's/-g//g' -e 's/-O[[0-9]]//g'` -g" 837c478bd9Sstevel@tonic-gate # If the user specify the directory for binutils, add the option `-B'. 847c478bd9Sstevel@tonic-gate if test "x$with_binutils" != x; then 857c478bd9Sstevel@tonic-gate CFLAGS="-B$with_binutils/ $CFLAGS" 867c478bd9Sstevel@tonic-gate fi 877c478bd9Sstevel@tonic-gate STAGE1_CFLAGS="-O2" 887c478bd9Sstevel@tonic-gate GRUB_CFLAGS="-O2" 897c478bd9Sstevel@tonic-gate AC_CACHE_CHECK([whether optimization for size works], size_flag, [ 907c478bd9Sstevel@tonic-gate saved_CFLAGS=$CFLAGS 917c478bd9Sstevel@tonic-gate CFLAGS="-Os -g" 927c478bd9Sstevel@tonic-gate AC_TRY_COMPILE(, , size_flag=yes, size_flag=no) 937c478bd9Sstevel@tonic-gate CFLAGS=$saved_CFLAGS 947c478bd9Sstevel@tonic-gate ]) 957c478bd9Sstevel@tonic-gate if test "x$size_flag" = xyes; then 967c478bd9Sstevel@tonic-gate STAGE2_CFLAGS="-Os" 977c478bd9Sstevel@tonic-gate else 987c478bd9Sstevel@tonic-gate STAGE2_CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops" 997c478bd9Sstevel@tonic-gate fi 1007c478bd9Sstevel@tonic-gate # OpenBSD has a GCC extension for protecting applications from 1017c478bd9Sstevel@tonic-gate # stack smashing attacks, but GRUB doesn't want this feature. 1027c478bd9Sstevel@tonic-gate AC_CACHE_CHECK([whether gcc has -fno-stack-protector], 1037c478bd9Sstevel@tonic-gate no_stack_protector_flag, [ 1047c478bd9Sstevel@tonic-gate saved_CFLAGS=$CFLAGS 1057c478bd9Sstevel@tonic-gate CFLAGS="-fno-stack-protector" 1067c478bd9Sstevel@tonic-gate AC_TRY_COMPILE(, 1077c478bd9Sstevel@tonic-gate , 1087c478bd9Sstevel@tonic-gate no_stack_protector_flag=yes, 1097c478bd9Sstevel@tonic-gate no_stack_protector_flag=no) 1107c478bd9Sstevel@tonic-gate CFLAGS=$saved_CFLAGS 1117c478bd9Sstevel@tonic-gate ]) 1127c478bd9Sstevel@tonic-gate if test "x$no_stack_protector_flag" = xyes; then 1137c478bd9Sstevel@tonic-gate STAGE2_CFLAGS="$STAGE2_CFLAGS -fno-stack-protector" 1147c478bd9Sstevel@tonic-gate fi 1157c478bd9Sstevel@tonic-gate fi 1167c478bd9Sstevel@tonic-gatefi 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gateAC_SUBST(STAGE1_CFLAGS) 1197c478bd9Sstevel@tonic-gateAC_SUBST(STAGE2_CFLAGS) 1207c478bd9Sstevel@tonic-gateAC_SUBST(GRUB_CFLAGS) 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate# Enforce coding standards. 1237c478bd9Sstevel@tonic-gateCPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused -Wshadow" 1247c478bd9Sstevel@tonic-gateCPPFLAGS="$CPPFLAGS -Wpointer-arith" 1257c478bd9Sstevel@tonic-gate 1267c478bd9Sstevel@tonic-gateAC_CACHE_CHECK([whether -Wundef works], undef_flag, [ 1277c478bd9Sstevel@tonic-gate saved_CPPFLAGS="$CPPFLAGS" 1287c478bd9Sstevel@tonic-gate CPPFLAGS="-Wundef" 1297c478bd9Sstevel@tonic-gate AC_TRY_COMPILE(, , undef_flag=yes, undef_flag=no) 1307c478bd9Sstevel@tonic-gate CPPFLAGS="$saved_CPPFLAGS" 1317c478bd9Sstevel@tonic-gate]) 1327c478bd9Sstevel@tonic-gate 1337c478bd9Sstevel@tonic-gate# The options `-falign-*' are supported by gcc 3.0 or later. 1347c478bd9Sstevel@tonic-gate# Probably it is sufficient to only check for -falign-loops. 1357c478bd9Sstevel@tonic-gateAC_CACHE_CHECK([whether -falign-loops works], [falign_loop_flag], [ 1367c478bd9Sstevel@tonic-gate saved_CPPFLAGS="$CPPFLAGS" 1377c478bd9Sstevel@tonic-gate CPPFLAGS="-falign-loops=1" 1387c478bd9Sstevel@tonic-gate AC_TRY_COMPILE(, , [falign_loop_flag=yes], [falign_loop_flag=no]) 1397c478bd9Sstevel@tonic-gate CPPFLAGS="$saved_CPPFLAGS" 1407c478bd9Sstevel@tonic-gate]) 1417c478bd9Sstevel@tonic-gate 1427c478bd9Sstevel@tonic-gate# Force no alignment to save space. 1437c478bd9Sstevel@tonic-gateif test "x$falign_loop_flag" = xyes; then 1447c478bd9Sstevel@tonic-gate CPPFLAGS="$CPPFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1" 1457c478bd9Sstevel@tonic-gateelse 1467c478bd9Sstevel@tonic-gate CPPFLAGS="$CPPFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1" 1477c478bd9Sstevel@tonic-gatefi 1487c478bd9Sstevel@tonic-gate 1497c478bd9Sstevel@tonic-gateif test "x$undef_flag" = xyes; then 1507c478bd9Sstevel@tonic-gate CPPFLAGS="$CPPFLAGS -Wundef" 1517c478bd9Sstevel@tonic-gatefi 1527c478bd9Sstevel@tonic-gate 1537c478bd9Sstevel@tonic-gateif test "x$with_binutils" != x; then 1547c478bd9Sstevel@tonic-gatednl AC_PATH_TOOL(OBJCOPY, objcopy, , "$with_binutils:$PATH") 1557c478bd9Sstevel@tonic-gate AC_PATH_PROG(OBJCOPY, objcopy, , "$with_binutils:$PATH") 1567c478bd9Sstevel@tonic-gateelse 1577c478bd9Sstevel@tonic-gate AC_CHECK_TOOL(OBJCOPY, objcopy) 1587c478bd9Sstevel@tonic-gatefi 1597c478bd9Sstevel@tonic-gate 1607c478bd9Sstevel@tonic-gate# Defined in acinclude.m4. 1617c478bd9Sstevel@tonic-gategrub_ASM_USCORE 1627c478bd9Sstevel@tonic-gategrub_PROG_OBJCOPY_ABSOLUTE 1637c478bd9Sstevel@tonic-gateif test "x$grub_cv_prog_objcopy_absolute" != xyes; then 1647c478bd9Sstevel@tonic-gate AC_MSG_ERROR([GRUB requires a working absolute objcopy; upgrade your binutils]) 1657c478bd9Sstevel@tonic-gatefi 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gategrub_ASM_PREFIX_REQUIREMENT 1687c478bd9Sstevel@tonic-gate 1697c478bd9Sstevel@tonic-gategrub_ASM_ADDR32 1707c478bd9Sstevel@tonic-gateif test "x$grub_cv_asm_addr32" != xyes; then 1717c478bd9Sstevel@tonic-gate AC_MSG_ERROR([GRUB requires GAS .code16 addr32 support; upgrade your binutils]) 1727c478bd9Sstevel@tonic-gatefi 1737c478bd9Sstevel@tonic-gate 1747c478bd9Sstevel@tonic-gategrub_ASM_ABSOLUTE_WITHOUT_ASTERISK 1757c478bd9Sstevel@tonic-gate 1767c478bd9Sstevel@tonic-gategrub_CHECK_START_SYMBOL 1777c478bd9Sstevel@tonic-gategrub_CHECK_USCORE_START_SYMBOL 1787c478bd9Sstevel@tonic-gateif test "x$grub_cv_check_start_symbol" != "xyes" \ 1797c478bd9Sstevel@tonic-gate -a "x$grub_cv_check_uscore_start_symbol" != "xyes"; then 1807c478bd9Sstevel@tonic-gate AC_MSG_ERROR([Neither start nor _start is defined]) 1817c478bd9Sstevel@tonic-gatefi 1827c478bd9Sstevel@tonic-gate 1837c478bd9Sstevel@tonic-gategrub_CHECK_USCORE_USCORE_BSS_START_SYMBOL 1847c478bd9Sstevel@tonic-gategrub_CHECK_USCORE_EDATA_SYMBOL 1857c478bd9Sstevel@tonic-gategrub_CHECK_EDATA_SYMBOL 1867c478bd9Sstevel@tonic-gateif test "x$grub_cv_check_uscore_uscore_bss_start_symbol" != "xyes" \ 1877c478bd9Sstevel@tonic-gate -a "x$grub_cv_check_uscore_edata_symbol" != "xyes" \ 1887c478bd9Sstevel@tonic-gate -a "x$grub_cv_check_edata_symbol" != "xyes"; then 1897c478bd9Sstevel@tonic-gate AC_MSG_ERROR([None of __bss_start, _edata, edata defined]) 1907c478bd9Sstevel@tonic-gatefi 1917c478bd9Sstevel@tonic-gate 1927c478bd9Sstevel@tonic-gategrub_CHECK_END_SYMBOL 1937c478bd9Sstevel@tonic-gategrub_CHECK_USCORE_END_SYMBOL 1947c478bd9Sstevel@tonic-gateif test "x$grub_cv_check_end_symbol" != "xyes" \ 1957c478bd9Sstevel@tonic-gate -a "x$grub_cv_check_uscore_end_symbol" != "xyes"; then 1967c478bd9Sstevel@tonic-gate AC_MSG_ERROR([Neither end nor _end is defined]) 1977c478bd9Sstevel@tonic-gatefi 1987c478bd9Sstevel@tonic-gate 1997c478bd9Sstevel@tonic-gate# Check for curses libraries. 2007c478bd9Sstevel@tonic-gateAC_ARG_WITH(curses, 2017c478bd9Sstevel@tonic-gate [ --without-curses do not use curses]) 2027c478bd9Sstevel@tonic-gate 2037c478bd9Sstevel@tonic-gate# Get the filename or the whole disk and open it. 2047c478bd9Sstevel@tonic-gate# Known to work on NetBSD. 2057c478bd9Sstevel@tonic-gateAC_CHECK_LIB(util, opendisk, [GRUB_LIBS="$GRUB_LIBS -lutil" 2067c478bd9Sstevel@tonic-gate AC_DEFINE(HAVE_OPENDISK, 1, [Define if opendisk() in -lutil can be used])]) 2077c478bd9Sstevel@tonic-gate 2087c478bd9Sstevel@tonic-gate# Unless the user specify --without-curses, check for curses. 2097c478bd9Sstevel@tonic-gateif test "x$with_curses" != "xno"; then 2107c478bd9Sstevel@tonic-gate AC_CHECK_LIB(ncurses, wgetch, [GRUB_LIBS="$GRUB_LIBS -lncurses" 2117c478bd9Sstevel@tonic-gate AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])], 2127c478bd9Sstevel@tonic-gate [AC_CHECK_LIB(curses, wgetch, [GRUB_LIBS="$GRUB_LIBS -lcurses" 2137c478bd9Sstevel@tonic-gate AC_DEFINE(HAVE_LIBCURSES, 1, [Define if you have a curses library])])]) 2147c478bd9Sstevel@tonic-gatefi 2157c478bd9Sstevel@tonic-gate 2167c478bd9Sstevel@tonic-gateAC_SUBST(GRUB_LIBS) 2177c478bd9Sstevel@tonic-gate 2187c478bd9Sstevel@tonic-gate# Check for headers. 2197c478bd9Sstevel@tonic-gateAC_CHECK_HEADERS(string.h strings.h ncurses/curses.h ncurses.h curses.h) 2207c478bd9Sstevel@tonic-gate 2217c478bd9Sstevel@tonic-gate# Check for user options. 2227c478bd9Sstevel@tonic-gate 2237c478bd9Sstevel@tonic-gate# filesystems support. 2247c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(ext2fs, 2257c478bd9Sstevel@tonic-gate [ --disable-ext2fs disable ext2fs support in Stage 2]) 2267c478bd9Sstevel@tonic-gate 2277c478bd9Sstevel@tonic-gateif test x"$enable_ext2fs" != xno; then 2287c478bd9Sstevel@tonic-gate FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_EXT2FS=1" 2297c478bd9Sstevel@tonic-gatefi 2307c478bd9Sstevel@tonic-gate 2317c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(fat, 2327c478bd9Sstevel@tonic-gate [ --disable-fat disable FAT support in Stage 2]) 2337c478bd9Sstevel@tonic-gate 2347c478bd9Sstevel@tonic-gateif test x"$enable_fat" != xno; then 2357c478bd9Sstevel@tonic-gate FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_FAT=1" 2367c478bd9Sstevel@tonic-gatefi 2377c478bd9Sstevel@tonic-gate 2387c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(ffs, 2397c478bd9Sstevel@tonic-gate [ --disable-ffs disable FFS support in Stage 2]) 2407c478bd9Sstevel@tonic-gate 2417c478bd9Sstevel@tonic-gateif test x"$enable_ffs" != xno; then 2427c478bd9Sstevel@tonic-gate FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_FFS=1" 2437c478bd9Sstevel@tonic-gatefi 2447c478bd9Sstevel@tonic-gate 2457c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(ufs, 2467c478bd9Sstevel@tonic-gate [ --disable-ufs disable UFS support in Stage 2]) 2477c478bd9Sstevel@tonic-gate 2487c478bd9Sstevel@tonic-gateif test x"$enable_ufs" != xno; then 2497c478bd9Sstevel@tonic-gate FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_UFS=1" 2507c478bd9Sstevel@tonic-gatefi 2517c478bd9Sstevel@tonic-gate 2527c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(ufs2, 2537c478bd9Sstevel@tonic-gate [ --disable-ufs2 disable UFS2 support in Stage 2]) 2547c478bd9Sstevel@tonic-gate 2557c478bd9Sstevel@tonic-gateif test x"$enable_ufs2" != xno; then 2567c478bd9Sstevel@tonic-gate FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_UFS2=1" 2577c478bd9Sstevel@tonic-gatefi 2587c478bd9Sstevel@tonic-gate 2597c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(minix, 2607c478bd9Sstevel@tonic-gate [ --disable-minix disable Minix fs support in Stage 2]) 2617c478bd9Sstevel@tonic-gate 2627c478bd9Sstevel@tonic-gateif test x"$enable_minix" != xno; then 2637c478bd9Sstevel@tonic-gate FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_MINIX=1" 2647c478bd9Sstevel@tonic-gatefi 2657c478bd9Sstevel@tonic-gate 2667c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(reiserfs, 2677c478bd9Sstevel@tonic-gate [ --disable-reiserfs disable ReiserFS support in Stage 2]) 2687c478bd9Sstevel@tonic-gate 2697c478bd9Sstevel@tonic-gateif test x"$enable_reiserfs" != xno; then 2707c478bd9Sstevel@tonic-gate FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_REISERFS=1" 2717c478bd9Sstevel@tonic-gatefi 2727c478bd9Sstevel@tonic-gate 2737c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(vstafs, 2747c478bd9Sstevel@tonic-gate [ --disable-vstafs disable VSTa FS support in Stage 2]) 2757c478bd9Sstevel@tonic-gate 2767c478bd9Sstevel@tonic-gateif test x"$enable_vstafs" != xno; then 2777c478bd9Sstevel@tonic-gate FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_VSTAFS=1" 2787c478bd9Sstevel@tonic-gatefi 2797c478bd9Sstevel@tonic-gate 2807c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(jfs, 2817c478bd9Sstevel@tonic-gate [ --disable-jfs disable IBM JFS support in Stage 2]) 2827c478bd9Sstevel@tonic-gate 2837c478bd9Sstevel@tonic-gateif test x"$enable_jfs" != xno; then 2847c478bd9Sstevel@tonic-gate FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_JFS=1" 2857c478bd9Sstevel@tonic-gatefi 2867c478bd9Sstevel@tonic-gate 2877c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(xfs, 2887c478bd9Sstevel@tonic-gate [ --disable-xfs disable SGI XFS support in Stage 2]) 2897c478bd9Sstevel@tonic-gate 2907c478bd9Sstevel@tonic-gateif test x"$enable_xfs" != xno; then 2917c478bd9Sstevel@tonic-gate FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_XFS=1" 2927c478bd9Sstevel@tonic-gatefi 2937c478bd9Sstevel@tonic-gate 294b1b8ab34SllingAC_ARG_ENABLE(zfs, 295b1b8ab34Slling [ --disable-zfs disable ZFS support in Stage 2]) 296b1b8ab34Slling 297b1b8ab34Sllingif test x"$enable_zfs" != xno; then 298b1b8ab34Slling FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_ZFS=1" 299b1b8ab34Sllingfi 300b1b8ab34Slling 3017c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(iso9660, 3027c478bd9Sstevel@tonic-gate [ --disable-iso9660 disable ISO9660 support in Stage 2]) 3037c478bd9Sstevel@tonic-gate 3047c478bd9Sstevel@tonic-gateif test x"$enable_iso9660" != xno; then 3057c478bd9Sstevel@tonic-gate FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_ISO9660=1" 3067c478bd9Sstevel@tonic-gatefi 3077c478bd9Sstevel@tonic-gate 3087c478bd9Sstevel@tonic-gatednl AC_ARG_ENABLE(tftp, 3097c478bd9Sstevel@tonic-gatednl [ --enable-tftp enable TFTP support in Stage 2]) 3107c478bd9Sstevel@tonic-gatednl 3117c478bd9Sstevel@tonic-gatednl #if test x"$enable_tftp" = xyes; then 3127c478bd9Sstevel@tonic-gatednl FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_TFTP=1" 3137c478bd9Sstevel@tonic-gatednl fi 3147c478bd9Sstevel@tonic-gate 3157c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(gunzip, 3167c478bd9Sstevel@tonic-gate [ --disable-gunzip disable decompression in Stage 2]) 3177c478bd9Sstevel@tonic-gate 3187c478bd9Sstevel@tonic-gateif test x"$enable_gunzip" = xno; then 3197c478bd9Sstevel@tonic-gate FSYS_CFLAGS="$FSYS_CFLAGS -DNO_DECOMPRESSION=1" 3207c478bd9Sstevel@tonic-gatefi 3217c478bd9Sstevel@tonic-gate 3227c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(md5-password, 3237c478bd9Sstevel@tonic-gate [ --disable-md5-password disable MD5 password support in Stage 2]) 3247c478bd9Sstevel@tonic-gateif test "x$enable_md5_password" != xno; then 3257c478bd9Sstevel@tonic-gate FSYS_CFLAGS="$FSYS_CFLAGS -DUSE_MD5_PASSWORDS=1" 3267c478bd9Sstevel@tonic-gatefi 3277c478bd9Sstevel@tonic-gate 3287c478bd9Sstevel@tonic-gatednl The netboot support. 3297c478bd9Sstevel@tonic-gatednl General options. 3307c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(packet-retransmission, 3317c478bd9Sstevel@tonic-gate [ --disable-packet-retransmission 3327c478bd9Sstevel@tonic-gate turn off packet retransmission]) 3337c478bd9Sstevel@tonic-gateif test "x$enable_packet_retransmission" != xno; then 3347c478bd9Sstevel@tonic-gate NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONGESTED=1 -DCONFIG_PCI" 3357c478bd9Sstevel@tonic-gatefi 3367c478bd9Sstevel@tonic-gate 3377c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(pci-direct, 3387c478bd9Sstevel@tonic-gate [ --enable-pci-direct access PCI directly instead of using BIOS]) 3397c478bd9Sstevel@tonic-gateif test "x$enable_pci_direct" = xyes; then 3407c478bd9Sstevel@tonic-gate NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONFIG_PCI_DIRECT=1" 3417c478bd9Sstevel@tonic-gatefi 3427c478bd9Sstevel@tonic-gate 3437c478bd9Sstevel@tonic-gatednl Device drivers. 3447c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(3c595, 3457c478bd9Sstevel@tonic-gate [ --enable-3c595 enable 3Com595 driver]) 3467c478bd9Sstevel@tonic-gateif test "x$enable_3c595" = xyes; then 3477c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C595=1" 3487c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c595.o" 3497c478bd9Sstevel@tonic-gatefi 3507c478bd9Sstevel@tonic-gate 3517c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(3c90x, 3527c478bd9Sstevel@tonic-gate [ --enable-3c90x enable 3Com90x driver]) 3537c478bd9Sstevel@tonic-gateif test "x$enable_3c90x" = xyes; then 3547c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C90X=1" 3557c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c90x.o" 3567c478bd9Sstevel@tonic-gatefi 3577c478bd9Sstevel@tonic-gate 3587c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(davicom, 3597c478bd9Sstevel@tonic-gate [ --enable-davicom enable Davicom driver]) 3607c478bd9Sstevel@tonic-gateif test "x$enable_davicom" = xyes; then 3617c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_DAVICOM=1" 3627c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS davicom.o" 3637c478bd9Sstevel@tonic-gatefi 3647c478bd9Sstevel@tonic-gate 3657c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(e1000, 3667c478bd9Sstevel@tonic-gate [ --enable-e1000 enable Etherexpress Pro/1000 driver]) 3677c478bd9Sstevel@tonic-gateif test "x$enable_e1000" = xyes; then 3687c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_E1000=1" 3697c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS e1000.o" 3707c478bd9Sstevel@tonic-gatefi 3717c478bd9Sstevel@tonic-gate 3727c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(eepro100, 3737c478bd9Sstevel@tonic-gate [ --enable-eepro100 enable Etherexpress Pro/100 driver]) 3747c478bd9Sstevel@tonic-gateif test "x$enable_eepro100" = xyes; then 3757c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_EEPRO100=1" 3767c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS eepro100.o" 3777c478bd9Sstevel@tonic-gatefi 3787c478bd9Sstevel@tonic-gate 3797c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(epic100, 3807c478bd9Sstevel@tonic-gate [ --enable-epic100 enable SMC 83c170 EPIC/100 driver]) 3817c478bd9Sstevel@tonic-gateif test "x$enable_epic100" = xyes; then 3827c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_EPIC100=1" 3837c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS epic100.o" 3847c478bd9Sstevel@tonic-gatefi 3857c478bd9Sstevel@tonic-gate 3867c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(forcedeth, 3877c478bd9Sstevel@tonic-gate [ --enable-forcedeth enable Nvidia Geforce driver]) 3887c478bd9Sstevel@tonic-gateif test "x$enable_forcedeth" = xyes; then 3897c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_FORCEDETH=1" 3907c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS forcedeth.o" 3917c478bd9Sstevel@tonic-gatefi 3927c478bd9Sstevel@tonic-gate 3937c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(natsemi, 3947c478bd9Sstevel@tonic-gate [ --enable-natsemi enable NatSemi DP8381x driver]) 3957c478bd9Sstevel@tonic-gateif test "x$enable_natsemi" = xyes; then 3967c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NATSEMI=1" 3977c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS natsemi.o" 3987c478bd9Sstevel@tonic-gatefi 3997c478bd9Sstevel@tonic-gate 4007c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(ns83820, 4017c478bd9Sstevel@tonic-gate [ --enable-ns83820 enable NS83820 driver]) 4027c478bd9Sstevel@tonic-gateif test "x$enable_ns83820" = xyes; then 4037c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NS83820=1" 4047c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS ns83820.o" 4057c478bd9Sstevel@tonic-gatefi 4067c478bd9Sstevel@tonic-gate 4077c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(ns8390, 4087c478bd9Sstevel@tonic-gate [ --enable-ns8390 enable NE2000 PCI driver]) 4097c478bd9Sstevel@tonic-gateif test "x$enable_ns8390" = xyes; then 4107c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NS8390=1" 4117c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS ns8390.o" 4127c478bd9Sstevel@tonic-gatefi 4137c478bd9Sstevel@tonic-gate 4147c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(pcnet32, 4157c478bd9Sstevel@tonic-gate [ --enable-pcnet32 enable AMD Lance/PCI PCNet/32 driver]) 4167c478bd9Sstevel@tonic-gateif test "x$enable_pcnet32" = xyes; then 4177c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_PCNET32=1" 4187c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS pcnet32.o" 4197c478bd9Sstevel@tonic-gatefi 4207c478bd9Sstevel@tonic-gate 4217c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(pnic, 4227c478bd9Sstevel@tonic-gate [ --enable-pnic enable Bochs Pseudo Nic driver]) 4237c478bd9Sstevel@tonic-gateif test "x$enable_pnic" = xyes; then 4247c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_PNIC=1" 4257c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS pnic.o" 4267c478bd9Sstevel@tonic-gatefi 4277c478bd9Sstevel@tonic-gate 4287c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(rtl8139, 4297c478bd9Sstevel@tonic-gate [ --enable-rtl8139 enable Realtek 8139 driver]) 4307c478bd9Sstevel@tonic-gateif test "x$enable_rtl8139" = xyes; then 4317c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_RTL8139=1" 4327c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS rtl8139.o" 4337c478bd9Sstevel@tonic-gatefi 4347c478bd9Sstevel@tonic-gate 4357c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(r8169, 4367c478bd9Sstevel@tonic-gate [ --enable-r8169 enable Realtek 8169 driver]) 4377c478bd9Sstevel@tonic-gateif test "x$enable_r8169" = xyes; then 4387c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_R8169=1" 4397c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS r8169.o" 4407c478bd9Sstevel@tonic-gatefi 4417c478bd9Sstevel@tonic-gate 4427c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(sis900, 4437c478bd9Sstevel@tonic-gate [ --enable-sis900 enable SIS 900 and SIS 7016 driver]) 4447c478bd9Sstevel@tonic-gateif test "x$enable_sis900" = xyes; then 4457c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_SIS900=1" 4467c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS sis900.o" 4477c478bd9Sstevel@tonic-gatefi 4487c478bd9Sstevel@tonic-gate 4497c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(sundance, 4507c478bd9Sstevel@tonic-gate [ --enable-sundance enable Sundance ST201 driver]) 4517c478bd9Sstevel@tonic-gateif test "x$enable_sundance" = xyes; then 4527c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_SUNDANCE=1" 4537c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS sundance.o" 4547c478bd9Sstevel@tonic-gatefi 4557c478bd9Sstevel@tonic-gate 4567c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(tg3, 4577c478bd9Sstevel@tonic-gate [ --enable-tg3 enable Broadcom Tigon3 driver]) 4587c478bd9Sstevel@tonic-gateif test "x$enable_tg3" = xyes; then 4597c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TG3=1" 4607c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS tg3.o" 4617c478bd9Sstevel@tonic-gatefi 4627c478bd9Sstevel@tonic-gate 4637c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(tulip, 4647c478bd9Sstevel@tonic-gate [ --enable-tulip enable Tulip driver]) 4657c478bd9Sstevel@tonic-gateif test "x$enable_tulip" = xyes; then 4667c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TULIP=1" 4677c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS tulip.o" 4687c478bd9Sstevel@tonic-gatefi 4697c478bd9Sstevel@tonic-gate 4707c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(tlan, 4717c478bd9Sstevel@tonic-gate [ --enable-tlan enable TI ThunderLAN driver]) 4727c478bd9Sstevel@tonic-gateif test "x$enable_tlan" = xyes; then 4737c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TLAN=1" 4747c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS tlan.o" 4757c478bd9Sstevel@tonic-gatefi 4767c478bd9Sstevel@tonic-gate 4777c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(undi, 4787c478bd9Sstevel@tonic-gate [ --enable-undi enable PXE UNDI driver]) 4797c478bd9Sstevel@tonic-gateif test "x$enable_undi" = xyes; then 4807c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_UNDI=1" 4817c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS undi.o" 4827c478bd9Sstevel@tonic-gatefi 4837c478bd9Sstevel@tonic-gate 4847c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(via-rhine, 4857c478bd9Sstevel@tonic-gate [ --enable-via-rhine enable Rhine-I/II driver]) 4867c478bd9Sstevel@tonic-gateif test "x$enable_via_rhine" = xyes; then 4877c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_VIA_RHINE=1" 4887c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS via_rhine.o" 4897c478bd9Sstevel@tonic-gatefi 4907c478bd9Sstevel@tonic-gate 4917c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(w89c840, 4927c478bd9Sstevel@tonic-gate [ --enable-w89c840 enable Winbond W89c840 driver]) 4937c478bd9Sstevel@tonic-gateif test "x$enable_w89c840" = xyes; then 4947c478bd9Sstevel@tonic-gate NET_CFLAGS="$NET_CFLAGS -DINCLUDE_W89C840=1" 4957c478bd9Sstevel@tonic-gate NETBOOT_DRIVERS="$NETBOOT_DRIVERS w89c840.o" 4967c478bd9Sstevel@tonic-gatefi 4977c478bd9Sstevel@tonic-gate 4987c478bd9Sstevel@tonic-gatednl Check if the netboot support is turned on. 4997c478bd9Sstevel@tonic-gateAM_CONDITIONAL(NETBOOT_SUPPORT, test "x$NET_CFLAGS" != x) 5007c478bd9Sstevel@tonic-gateif test "x$NET_CFLAGS" != x; then 5017c478bd9Sstevel@tonic-gate FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_TFTP=1" 5027c478bd9Sstevel@tonic-gatefi 5037c478bd9Sstevel@tonic-gate 5047c478bd9Sstevel@tonic-gatednl extra flag for ns8390.c 5057c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(compex-rl2000-fix, 5067c478bd9Sstevel@tonic-gate [ --enable-compex-rl2000-fix 5077c478bd9Sstevel@tonic-gate specify this if you have a Compex RL2000 PCI]) 5087c478bd9Sstevel@tonic-gateif test "x$enable_compex_rl2000_fix" = xyes; then 5097c478bd9Sstevel@tonic-gate NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCOMPEX_RL2000_FIX=1" 5107c478bd9Sstevel@tonic-gatefi 5117c478bd9Sstevel@tonic-gate 5127c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(ne-scan, 5137c478bd9Sstevel@tonic-gate [ --enable-ne-scan=LIST probe for NE base address using LIST], 5147c478bd9Sstevel@tonic-gate [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DNE_SCAN=$enable_ne_scan"], 5157c478bd9Sstevel@tonic-gate [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DNE_SCAN=0x280,0x300,0x320,0x340"]) 5167c478bd9Sstevel@tonic-gate 5177c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(wd-default-mem, 5187c478bd9Sstevel@tonic-gate [ --enable-wd-default-mem=MEM 5197c478bd9Sstevel@tonic-gate set the default memory location for WD/SMC], 5207c478bd9Sstevel@tonic-gate [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DWD_DEFAULT_MEM=$enable_wd_default_mem"], 5217c478bd9Sstevel@tonic-gate [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DWD_DEFAULT_MEM=0xCC000"]) 5227c478bd9Sstevel@tonic-gate 5237c478bd9Sstevel@tonic-gatednl Diskless 5247c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(diskless, 5257c478bd9Sstevel@tonic-gate [ --enable-diskless enable diskless support]) 5267c478bd9Sstevel@tonic-gateAM_CONDITIONAL(DISKLESS_SUPPORT, test "x$enable_diskless" = xyes) 5277c478bd9Sstevel@tonic-gate 5287c478bd9Sstevel@tonic-gatednl Graphical splashscreen support 5297c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(graphics, 5307c478bd9Sstevel@tonic-gate [ --disable-graphics disable graphics terminal support]) 5317c478bd9Sstevel@tonic-gateAM_CONDITIONAL(GRAPHICS_SUPPORT, test "x$enable_graphics" != xno) 5327c478bd9Sstevel@tonic-gate 5337c478bd9Sstevel@tonic-gatednl Hercules terminal 5347c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(hercules, 5357c478bd9Sstevel@tonic-gate [ --disable-hercules disable hercules terminal support]) 5367c478bd9Sstevel@tonic-gateAM_CONDITIONAL(HERCULES_SUPPORT, test "x$enable_hercules" != xno) 5377c478bd9Sstevel@tonic-gate 5387c478bd9Sstevel@tonic-gatednl Serial terminal 5397c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(serial, 5407c478bd9Sstevel@tonic-gate [ --disable-serial disable serial terminal support]) 5417c478bd9Sstevel@tonic-gateAM_CONDITIONAL(SERIAL_SUPPORT, test "x$enable_serial" != xno) 5427c478bd9Sstevel@tonic-gate 5437c478bd9Sstevel@tonic-gatednl Simulation of the slowness of a serial device. 5447c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(serial-speed-simulation, 5457c478bd9Sstevel@tonic-gate [ --enable-serial-speed-simulation 5467c478bd9Sstevel@tonic-gate simulate the slowness of a serial device]) 5477c478bd9Sstevel@tonic-gateAM_CONDITIONAL(SERIAL_SPEED_SIMULATION, 5487c478bd9Sstevel@tonic-gate test "x$enable_serial_speed_simulation" = xyes) 5497c478bd9Sstevel@tonic-gate 5507c478bd9Sstevel@tonic-gate# Sanity check. 5517c478bd9Sstevel@tonic-gateif test "x$enable_diskless" = xyes; then 5527c478bd9Sstevel@tonic-gate if test "x$NET_CFLAGS" = x; then 5537c478bd9Sstevel@tonic-gate AC_MSG_ERROR([You must enable at least one network driver]) 5547c478bd9Sstevel@tonic-gate fi 5557c478bd9Sstevel@tonic-gatefi 5567c478bd9Sstevel@tonic-gate 5577c478bd9Sstevel@tonic-gatednl Embed a menu string in GRUB itself. 5587c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(preset-menu, 5597c478bd9Sstevel@tonic-gate [ --enable-preset-menu=FILE 5607c478bd9Sstevel@tonic-gate preset a menu file FILE in Stage 2]) 5617c478bd9Sstevel@tonic-gateif test "x$enable_preset_menu" = x; then 5627c478bd9Sstevel@tonic-gate : 5637c478bd9Sstevel@tonic-gateelse 5647c478bd9Sstevel@tonic-gate if test -r $enable_preset_menu; then 5657c478bd9Sstevel@tonic-gate grub_DEFINE_FILE(PRESET_MENU_STRING, [$enable_preset_menu], 5667c478bd9Sstevel@tonic-gate [Define if there is user specified preset menu string]) 5677c478bd9Sstevel@tonic-gate else 5687c478bd9Sstevel@tonic-gate AC_MSG_ERROR([Cannot read the preset menu file $enable_preset_menu]) 5697c478bd9Sstevel@tonic-gate fi 5707c478bd9Sstevel@tonic-gatefi 5717c478bd9Sstevel@tonic-gate 5727c478bd9Sstevel@tonic-gatednl Build the example Multiboot kernel. 5737c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(example-kernel, 5747c478bd9Sstevel@tonic-gate [ --enable-example-kernel 5757c478bd9Sstevel@tonic-gate build the example Multiboot kernel]) 5767c478bd9Sstevel@tonic-gateAM_CONDITIONAL(BUILD_EXAMPLE_KERNEL, test "x$enable_example_kernel" = xyes) 5777c478bd9Sstevel@tonic-gate 5787c478bd9Sstevel@tonic-gatednl Automatic Linux mem= option. 5797c478bd9Sstevel@tonic-gateAC_ARG_ENABLE(auto-linux-mem-opt, 5807c478bd9Sstevel@tonic-gate [ --disable-auto-linux-mem-opt 5817c478bd9Sstevel@tonic-gate don't pass Linux mem= option automatically]) 5827c478bd9Sstevel@tonic-gateif test "x$enable_auto_linux_mem_opt" = xno; then 5837c478bd9Sstevel@tonic-gate : 5847c478bd9Sstevel@tonic-gateelse 5857c478bd9Sstevel@tonic-gate AC_DEFINE(AUTO_LINUX_MEM_OPT, 1, [Define if you don't want to pass the mem= option to Linux]) 5867c478bd9Sstevel@tonic-gatefi 5877c478bd9Sstevel@tonic-gate 5887c478bd9Sstevel@tonic-gatednl Now substitute the variables. 5897c478bd9Sstevel@tonic-gateAC_SUBST(FSYS_CFLAGS) 5907c478bd9Sstevel@tonic-gateAC_SUBST(NET_CFLAGS) 5917c478bd9Sstevel@tonic-gateAC_SUBST(NET_EXTRAFLAGS) 5927c478bd9Sstevel@tonic-gateAC_SUBST(NETBOOT_DRIVERS) 5937c478bd9Sstevel@tonic-gate 5947c478bd9Sstevel@tonic-gatednl Because recent automake complains about CCASFLAGS, set it here. 5957c478bd9Sstevel@tonic-gateCCASFLAGS='$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)' 5967c478bd9Sstevel@tonic-gateAC_SUBST(CCASFLAGS) 5977c478bd9Sstevel@tonic-gate 5987c478bd9Sstevel@tonic-gate 5997c478bd9Sstevel@tonic-gatednl Output. 6007c478bd9Sstevel@tonic-gateAC_CONFIG_FILES([Makefile stage1/Makefile stage2/Makefile \ 6017c478bd9Sstevel@tonic-gate docs/Makefile lib/Makefile util/Makefile \ 6027c478bd9Sstevel@tonic-gate grub/Makefile netboot/Makefile util/grub-image \ 6037c478bd9Sstevel@tonic-gate util/grub-install util/grub-md5-crypt \ 6047c478bd9Sstevel@tonic-gate util/grub-terminfo util/grub-set-default]) 6057c478bd9Sstevel@tonic-gateAC_OUTPUT 606