2012/2/21 Vladimir 'φ-coder/phcoder' Serbinenko <phco...@gmail.com>:
> On 21.02.2012 20:04, Mike Gilbert wrote:
>>
>> 2012/2/21 Vladimir 'φ-coder/phcoder' Serbinenko<phco...@gmail.com>:
>>>
>>> Hello, it's to announce that from 27th of February the GRUB will be
>>> frozen
>>> for 2.00 release. From that date on, no new features will be committed
>>> only
>>> bugfixes.
>>> If you have a patch which you think should be included in 2.00 you can
>>> ping
>>> me about it but I might answer that it's postponed after 2.00
>>
>> It would be really great if you would reconsider the --disable-libzfs
>> flag that was proposed a few weeks ago.
>
> It was on my todo list to comment on it.
> The main problem is that it's not in line with other configure options: it
> has to be enable/disable and show the result in the status message (see e.g.
> SDL support)
>

I have attached a new patch for review. Thanks in advance.
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: flop...@gentoo.org-20120225183653-ht2hfsr8lpzcqa1x
# target_branch: file:///home/floppym/src/grub/trunk/
# testament_sha1: 1074def3743856c383bbbdc33396b8f3701a587c
# timestamp: 2012-02-25 13:38:55 -0500
# base_revision_id: phco...@gmail.com-20120225001529-hupo18shmta14v1b
# 
# Begin patch
=== modified file 'ChangeLog'
--- ChangeLog	2012-02-25 00:15:29 +0000
+++ ChangeLog	2012-02-25 18:36:53 +0000
@@ -1,3 +1,9 @@
+2012-02-25  Mike Gilbert  <flop...@gentoo.org>
+
+	Add configure flag to control libzfs integration.
+
+	* configure.ac: Add AC_ARG_ENABLE(libzfs ...) and associated logic.
+
 2012-02-25  Vladimir Serbinenko  <phco...@gmail.com>
 
 	Convert grub-emu to argp.

=== modified file 'configure.ac'
--- configure.ac	2012-02-24 11:30:32 +0000
+++ configure.ac	2012-02-25 18:36:53 +0000
@@ -302,7 +302,7 @@
 
 # Check for functions and headers.
 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
 #include <sys/param.h>
@@ -1006,16 +1006,41 @@
                         [Define to 1 if you have the LZMA library.])],)
 AC_SUBST([LIBLZMA])
 
-AC_CHECK_LIB([zfs], [libzfs_init],
-             [LIBZFS="-lzfs"
-              AC_DEFINE([HAVE_LIBZFS], [1],
-                        [Define to 1 if you have the ZFS library.])],)
+AC_ARG_ENABLE([libzfs],
+              [AS_HELP_STRING([--enable-libzfs],
+                              [enable libzfs integration (default=guessed)])])
+if test x"$enable_libzfs" = xno ; then
+  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],
+               [],
+               [libzfs_excuse="need nvpair library"])
+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],
+            [Define to 1 if you have the NVPAIR library.])
+fi
+
 AC_SUBST([LIBZFS])
-
-AC_CHECK_LIB([nvpair], [nvlist_print],
-             [LIBNVPAIR="-lnvpair"
-              AC_DEFINE([HAVE_LIBNVPAIR], [1],
-                        [Define to 1 if you have the NVPAIR library.])],)
 AC_SUBST([LIBNVPAIR])
 
 LIBS=""
@@ -1169,5 +1194,10 @@
 else
 echo starfield theme: No "($starfield_excuse)"
 fi
+if [ x"$libzfs_excuse" = x ]; then
+echo With libzfs support: Yes
+else
+echo With libzfs support: No "($libzfs_excuse)"
+fi
 echo "*******************************************************"
 ]

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWSRHBZwAArt/gAB4ABBcd///
f+/dur/v/3BgBp8CgAKJAiAAEJIpNJ+qbKeoPRBmUaaaaNNDJoAaAGgAHGTJoYjE0YBGAmEAYCaa
NMjQDHGTJoYjE0YBGAmEAYCaaNMjQDHGTJoYjE0YBGAmEAYCaaNMjQDHGTJoYjE0YBGAmEAYCaaN
MjQDCSQCAmTQGk0CYptBT0nsqbRNoj9NJPTJ6j1JEes2Wg5W8OSEGe7Q3/uH9DbaTDfsA+haxkWv
fVmuRqck204hFkHhVX/FLRlzl2FV9w7nm4JTdp0IScI8mSm2uBox0Gg+VbCZmaOsNVsaVjiHodB2
LOZ6vpgxGEIu2hVosvF4j0Zm4cmdzExz/nwCvy3m2wub6+bjsLh++4K/sQq/o8rdxa5N5VP8PCFu
BqebWqNxKp9cEfaCkoUREJn3iY8juRpR9XTLarN7+XqsRH0FvX+xPmL9RxWM9J2VAyCIrixt2ZF1
EY5SWfi+ydsRYfU4xwLk3+3UbjqQwENYfD3Ae8PV6Hho3GmlUy3EbSGw42ULEdiOjz/nDVDr9oi0
6TG20mGnXMFo9buPvCMgyaTCTQeDp74oXe8kRJPHAzg7AhAHtL1MeYWpVScuLdzKgZnH19GIaJxl
CsgyFPU7mphDSUCVv3XsoH+At879EAxrCVbunbtAt5dXKFVlTb7Bx1jO9Ab8LogZV7qXNbsfiEPw
chOEtw0kLgFuNc3AnWGYRCo1Vo4HE6gmPaB1AXY6LLmAkiA1ybIlLKF8rjANADRTizha8u0Ejuje
PCpxZY6GQ6PDiiJrVpuKodzBZVWMGWBR4GExbwJNgWMFxsIlNk7hmZ0GrfjUBz5PZ+WgNctYRVuO
QXbN4xzOLbQx17OgLNdzM4mMBvHG0c9+LrNpq1XEyWo05gPC8NeL3htnEITDUbIwrob34SQ2BLSR
qOBVS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rO
kB5HKFrEsw4Bi98yKfCxBTcFtZACj7Lx6jEKxFaGE+TkO/Khslqsz1lvCmQUCaUEGziEy9ZQQ4Xe
aUMMJk9Buc94tZqWYMG7kESNCMLoAbVqFJlWYLzCJf8XckU4UJAkRwWc
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to