mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-24 16:19:22 +00:00
Add configure flag to control libzfs integration.
* configure.ac: Add AC_ARG_ENABLE(libzfs ...) and associated logic.
This commit is contained in:
1 parent
1e9a9a3faf
commit
e4c498a106
2 files changed
+48
-8
No files matched your search
@@ -1,3 +1,9 @@
|
|||||||
|
2012-02-27 Mike Gilbert <floppym@gentoo.org>
|
||||||
|
|
||||||
|
Add configure flag to control libzfs integration.
|
||||||
|
|
||||||
|
* configure.ac: Add AC_ARG_ENABLE(libzfs ...) and associated logic.
|
||||||
|
|
||||||
2012-02-26 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-02-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/disk/diskfilter.c (insert_array): Choose the smallest
|
* grub-core/disk/diskfilter.c (insert_array): Choose the smallest
|
||||||
|
|||||||
+42
-8
@@ -302,7 +302,7 @@ fi
|
|||||||
|
|
||||||
# Check for functions and headers.
|
# Check for functions and headers.
|
||||||
AC_CHECK_FUNCS(posix_memalign memalign asprintf vasprintf getextmntent)
|
AC_CHECK_FUNCS(posix_memalign memalign asprintf vasprintf getextmntent)
|
||||||
AC_CHECK_HEADERS(libzfs.h libnvpair.h sys/param.h sys/mount.h sys/mnttab.h sys/mkdev.h limits.h)
|
AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h sys/mkdev.h limits.h)
|
||||||
|
|
||||||
AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$ac_includes_default
|
AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$ac_includes_default
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@@ -1006,16 +1006,45 @@ AC_CHECK_LIB([lzma], [lzma_code],
|
|||||||
[Define to 1 if you have the LZMA library.])],)
|
[Define to 1 if you have the LZMA library.])],)
|
||||||
AC_SUBST([LIBLZMA])
|
AC_SUBST([LIBLZMA])
|
||||||
|
|
||||||
AC_CHECK_LIB([zfs], [libzfs_init],
|
AC_ARG_ENABLE([libzfs],
|
||||||
[LIBZFS="-lzfs"
|
[AS_HELP_STRING([--enable-libzfs],
|
||||||
AC_DEFINE([HAVE_LIBZFS], [1],
|
[enable libzfs integration (default=guessed)])])
|
||||||
[Define to 1 if you have the ZFS library.])],)
|
if test x"$enable_libzfs" = xno ; then
|
||||||
AC_SUBST([LIBZFS])
|
libzfs_excuse="explicitly disabled"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x"$libzfs_excuse" = x ; then
|
||||||
|
# Only check for system headers if libzfs support has not been disabled.
|
||||||
|
AC_CHECK_HEADERS(libzfs.h libnvpair.h)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x"$libzfs_excuse" = x ; then
|
||||||
|
AC_CHECK_LIB([zfs], [libzfs_init],
|
||||||
|
[],
|
||||||
|
[libzfs_excuse="need zfs library"])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x"$libzfs_excuse" = x ; then
|
||||||
AC_CHECK_LIB([nvpair], [nvlist_print],
|
AC_CHECK_LIB([nvpair], [nvlist_print],
|
||||||
[LIBNVPAIR="-lnvpair"
|
[],
|
||||||
|
[libzfs_excuse="need nvpair library"])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x"$enable_libzfs" = xyes && test x"$libzfs_excuse" != x ; then
|
||||||
|
AC_MSG_ERROR([libzfs support was explicitly requested but requirements are not satisfied])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x"$libzfs_excuse" = x ; then
|
||||||
|
# We need both libzfs and libnvpair for a successful build.
|
||||||
|
LIBZFS="-lzfs"
|
||||||
|
AC_DEFINE([HAVE_LIBZFS], [1],
|
||||||
|
[Define to 1 if you have the ZFS library.])
|
||||||
|
LIBNVPAIR="-lnvpair"
|
||||||
AC_DEFINE([HAVE_LIBNVPAIR], [1],
|
AC_DEFINE([HAVE_LIBNVPAIR], [1],
|
||||||
[Define to 1 if you have the NVPAIR library.])],)
|
[Define to 1 if you have the NVPAIR library.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST([LIBZFS])
|
||||||
AC_SUBST([LIBNVPAIR])
|
AC_SUBST([LIBNVPAIR])
|
||||||
|
|
||||||
LIBS=""
|
LIBS=""
|
||||||
@@ -1169,5 +1198,10 @@ echo starfield theme: Yes
|
|||||||
else
|
else
|
||||||
echo starfield theme: No "($starfield_excuse)"
|
echo starfield theme: No "($starfield_excuse)"
|
||||||
fi
|
fi
|
||||||
|
if [ x"$libzfs_excuse" = x ]; then
|
||||||
|
echo With libzfs support: Yes
|
||||||
|
else
|
||||||
|
echo With libzfs support: No "($libzfs_excuse)"
|
||||||
|
fi
|
||||||
echo "*******************************************************"
|
echo "*******************************************************"
|
||||||
]
|
]
|
||||||
Reference in new issue
Block a user