Use libgeom on FreeBSD to detect partitions.
* Makefile.util.def (grub-mkimage): Add LIBGEOM to ldadd. (grub-mkrelpath): Likewise. (grub-script-check): Likewise. (grub-editenv): Likewise. (grub-mkpasswd-pbkdf2): Likewise. (grub-fstest): Likewise. (grub-mkfont): Likewise. (grub-mkdevicemap): Likewise. (grub-probe): Likewise. (grub-setup): Likewise. (grub-ofpathname): Likewise. (grub-mklayout): Likewise. (example_unit_test): Likewise. (grub-menulst2cfg): Likewise. * grub-core/Makefile.core.def (grub-emu): Likewise. (grub-emu-lite): Likewise. * configure.ac: Check for -lgeom on FreeBSD and set LIBGEOM. * grub-core/kern/emu/hostdisk.c [FreeBSD]: Include libgeom.h. Don't define HAVE_DIOCGDINFO. (follow_geom_up) [FreeBSD]: New function. (find_partition_start) [FreeBSD]: Rewritten using follow_geom_up. (convert_system_partition_to_system_disk) [FreeBSD]: Likewise. (grub_util_biosdisk_get_grub_dev) [FreeBSD]: Use FreeBSD path unconditionally of HAVE_DIOCGDINFO.
This commit is contained in:
parent
82fe6c751b
commit
f4727da93f
5 changed files with 132 additions and 20 deletions
|
@ -890,6 +890,15 @@ fi
|
|||
|
||||
AC_SUBST([LIBDEVMAPPER])
|
||||
|
||||
LIBGEOM=
|
||||
if test x$host_kernel = xkfreebsd; then
|
||||
AC_CHECK_LIB([geom], [geom_gettree], [],
|
||||
[AC_MSG_ERROR([Your platform requires libgeom])])
|
||||
LIBGEOM="-lgeom"
|
||||
fi
|
||||
|
||||
AC_SUBST([LIBGEOM])
|
||||
|
||||
AC_CHECK_LIB([lzma], [lzma_code],
|
||||
[LIBLZMA="-llzma"
|
||||
AC_DEFINE([HAVE_LIBLZMA], [1],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue