On 02/20/2012 04:41 PM, Richard W.M. Jones wrote:
On Mon, Feb 20, 2012 at 09:40:53AM +0800, Wanlong Gao wrote:
+dnl libblkid (highly recommended) +PKG_CHECK_MODULES([LIBBLKID], [blkid], + [AC_SUBST([LIBBLKID_CFLAGS]) + AC_SUBST([LIBBLKID_LIBS]) + AC_DEFINE([HAVE_LIBBLKID],[1],[libblkid found at compile time.]) + ], + [AC_MSG_WARN([libblkid not found, some features will be disabled])]) +AM_CONDITIONAL([HAVE_LIBBLKID],[test "x$LIBBLKID_LIBS" != "x"])
This makes libblkid conditional, but the code below assumes <blkid.h> and the blkid_* calls are present.
I'll have to check what RHEL 5 can do ...
I saw that RHEL5 only has the e2fsprogs-* package but not libblkid* packages, and the e2fsprogs-* for RHEL5 without the *probe* functions in libblkid, so, we should use 'blkid -c /dev/null xxx' on RHEL5 for compatibility. Agree? Thanks -Wanlong Gao
Rich.