Merge branch 'pci' into mips

This commit is contained in:
phcoder 2009-10-22 14:32:09 +02:00
commit 0f8d98dad2
12 changed files with 312 additions and 38 deletions

View file

@ -520,6 +520,10 @@ AC_ARG_ENABLE([grub-emu],
AC_ARG_ENABLE([grub-emu-usb],
[AS_HELP_STRING([--enable-grub-emu-usb],
[build and install the `grub-emu' debugging utility with USB support (default=guessed)])])
AC_ARG_ENABLE([grub-emu-pci],
[AS_HELP_STRING([--enable-grub-emu-pci],
[build and install the `grub-emu' debugging utility with PCI support (potentially dangerous) (default=no)])])
if test x"$enable_grub_emu" = xno ; then
grub_emu_excuse="explicitly disabled"
fi
@ -548,9 +552,14 @@ else
enable_grub_emu=no
grub_emu_usb_excuse="grub-emu isn't built"
fi
if test x"$enable_grub_emu_pci" = xyes ; then
grub_emu_usb_excuse="conflicts with PCI support"
fi
if test x"$enable_grub_emu_usb" = xno ; then
grub_emu_usb_excuse="explicitly disabled"
fi
[if [ x"$grub_emu_usb_excuse" = x ]; then
# Check for libusb libraries.]
AC_CHECK_LIB([usb], [usb_claim_interface], [LIBUSB="-lusb"],
@ -571,8 +580,35 @@ else
enable_grub_emu_usb=no
fi
if test x"$enable_grub_emu_pci" != xyes ; then
grub_emu_pci_excuse="not enabled"
fi
if test x"$enable_grub_emu_usb" = xyes ; then
grub_emu_pci_excuse="conflicts with USB support"
fi
[if [ x"$grub_emu_pci_excuse" = x ]; then
# Check for libpci libraries.]
AC_CHECK_LIB([pciaccess], [pci_system_init], [LIBPCIACCESS="-lpciaccess"],
[grub_emu_pci_excuse=["need libpciaccess library"]])
AC_SUBST([LIBPCIACCESS])
[fi]
[if [ x"$grub_emu_pci_excuse" = x ]; then
# Check for headers.]
AC_CHECK_HEADERS([pci/pci.h], [],
[grub_emu_pci_excuse=["need libpciaccess headers"]])
[fi]
if test x"$grub_emu_pci_excuse" = x ; then
enable_grub_emu_pci=yes
else
enable_grub_emu_pci=no
fi
AC_SUBST([enable_grub_emu])
AC_SUBST([enable_grub_emu_usb])
AC_SUBST([enable_grub_emu_pci])
AC_ARG_ENABLE([grub-fstest],
[AS_HELP_STRING([--enable-grub-fstest],
@ -646,6 +682,12 @@ echo USB support for grub-emu: Yes
else
echo USB support for grub-emu: No "($grub_emu_usb_excuse)"
fi
if [ x"$grub_emu_pci_excuse" = x ]; then
echo PCI support for grub-emu: Yes
else
echo PCI support for grub-emu: No "($grub_emu_pci_excuse)"
fi
if [ x"$enable_mm_debug" = xyes ]; then
echo With memory debugging: Yes
else