])
-dnl Mass confusion!
-dnl Older versions of GAS interpret `.code16' to mean ``generate 32-bit
-dnl instructions, but implicitly insert addr32 and data32 bytes so
-dnl that the code works in real mode''.
-dnl
-dnl Newer versions of GAS interpret `.code16' to mean ``generate 16-bit
-dnl instructions,'' which seems right. This requires the programmer
-dnl to explicitly insert addr32 and data32 instructions when they want
-dnl them.
-dnl
-dnl We only support the newer versions, because the old versions cause
-dnl major pain, by requiring manual assembly to get 16-bit instructions into
-dnl asm files.
-AC_DEFUN([grub_I386_ASM_ADDR32],
-[AC_REQUIRE([AC_PROG_CC])
-AC_REQUIRE([grub_I386_ASM_PREFIX_REQUIREMENT])
-AC_MSG_CHECKING([for .code16 addr32 assembler support])
-AC_CACHE_VAL(grub_cv_i386_asm_addr32,
-[cat > conftest.s.in <<\EOF
- .code16
-l1: @ADDR32@ movb %al, l1
-EOF
-
-if test "x$grub_cv_i386_asm_prefix_requirement" = xyes; then
- sed -e s/@ADDR32@/addr32/ < conftest.s.in > conftest.s
-else
- sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s
-fi
-
-if AC_TRY_COMMAND([${CC-cc} ${TARGET_CCASFLAGS} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
- grub_cv_i386_asm_addr32=yes
-else
- grub_cv_i386_asm_addr32=no
-fi
-
-rm -f conftest*])
-
-AC_MSG_RESULT([$grub_cv_i386_asm_addr32])])
-
-dnl Later versions of GAS requires that addr32 and data32 prefixes
-dnl appear in the same lines as the instructions they modify, while
-dnl earlier versions requires that they appear in separate lines.
-AC_DEFUN([grub_I386_ASM_PREFIX_REQUIREMENT],
-[AC_REQUIRE([AC_PROG_CC])
-AC_MSG_CHECKING(dnl
-[whether addr32 must be in the same line as the instruction])
-AC_CACHE_VAL(grub_cv_i386_asm_prefix_requirement,
-[cat > conftest.s <<\EOF
- .code16
-l1: addr32 movb %al, l1
-EOF
-
-if AC_TRY_COMMAND([${CC-cc} ${TARGET_CCASFLAGS} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
- grub_cv_i386_asm_prefix_requirement=yes
-else
- grub_cv_i386_asm_prefix_requirement=no
-fi
-
-rm -f conftest*])
-
-if test "x$grub_cv_i386_asm_prefix_requirement" = xyes; then
- grub_tmp_addr32="addr32"
-else
- grub_tmp_addr32="addr32;"
-fi
-
-ADDR32=$grub_tmp_addr32
-
-AC_MSG_RESULT([$grub_cv_i386_asm_prefix_requirement])])
-
-
dnl Check what symbol is defined as a bss start symbol.
dnl Written by Michael Hohmoth and Yoshinori K. Okuji.
AC_DEFUN([grub_CHECK_BSS_START_SYMBOL],