diff options
author | Neil Brown <neilb@suse.de> | 2007-05-03 10:46:02 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-05-03 10:46:02 +1000 |
commit | de6497fce274e35a0c7aeac14dbfff476b012e37 (patch) | |
tree | ca5f92269fce08f8f3abe4df76d7eacc23e060ba /aclocal | |
parent | 4cfb608c949d3f38d9d5bc2c3c8aef268b88a697 (diff) | |
download | nfs-utils-de6497fce274e35a0c7aeac14dbfff476b012e37.tar.gz nfs-utils-de6497fce274e35a0c7aeac14dbfff476b012e37.tar.xz nfs-utils-de6497fce274e35a0c7aeac14dbfff476b012e37.zip |
Detect version of libblkid and act accordingly.
libblkid earlier than 1.40 has a memory leak bug that make it unsuitable
for use in mountd.
So detect the version and default to not using it if too old. Give appropriate
warnings in various cases.
Diffstat (limited to 'aclocal')
-rw-r--r-- | aclocal/libblkid.m4 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/aclocal/libblkid.m4 b/aclocal/libblkid.m4 new file mode 100644 index 0000000..d751a8c --- /dev/null +++ b/aclocal/libblkid.m4 @@ -0,0 +1,20 @@ +dnl *************************** libblkid needs version 1.40 or later *********************** +AC_DEFUN([AC_BLKID_VERS], [ + AC_MSG_CHECKING(for suitable libblkid version) + AC_CACHE_VAL(libblkid_is_recent, + [ + saved_LIBS="$LIBS" + LIBS=-lblkid + AC_TRY_RUN([ + #include <blkid/blkid.h> + int main() + { + int vers = blkid_get_library_version(0, 0); + return vers >= 140 ? 0 : 1; + } + ], libblkid_is_recent=yes, libblkid_is_recent=no, + libblkid_is_recent=unknown) + LIBS="$saved_LIBS" + ])dnl + AC_MSG_RESULT($libblkid_is_recent) +])dnl |