]> err.no Git - util-linux/commitdiff
build-sys: add --with=fsprobe=builtin
authorKarel Zak <kzak@redhat.com>
Tue, 10 Feb 2009 10:43:50 +0000 (11:43 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 13 Feb 2009 10:34:47 +0000 (11:34 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
libs/Makefile.am

index 3ad174fc2c4503ea68fda0690f65e908ee87a4ac..2af03d9db7f704fd4eea0d687b872db5b84ff5f4 100644 (file)
@@ -192,17 +192,25 @@ AC_ARG_ENABLE([mount],
 
 AM_CONDITIONAL(HAVE_BLKID, false)
 AM_CONDITIONAL(HAVE_VOLUME_ID, false)
+AM_CONDITIONAL(BUILD_LIBBLKID, false)
+
+build_mount=yes
+have_blkid=no
+have_volume_id=no
+if test "x$with_fsprobe" = xblkid; then
+  UTIL_CHECK_LIB(blkid, blkid_known_fstype)
+elif test "x$with_fsprobe" = xvolume_id; then
+  UTIL_CHECK_LIB(volume_id, volume_id_encode_string)
+elif test "x$with_fsprobe" = xbuiltin; then
+  have_blkid=yes
+  AC_DEFINE(HAVE_LIBBLKID,1,[Define to 1 if you have the -lblkid.])
+  AM_CONDITIONAL(HAVE_BLKID, true)
+  AM_CONDITIONAL(BUILD_LIBBLKID, true)
+fi
+
 if test "${enable_mount}" = "no"; then
   build_mount=no
 elif test "x$linux_os" = xyes; then
-  build_mount=yes
-  have_blkid=no
-  have_volume_id=no
-  if test "x$with_fsprobe" = xblkid; then
-    UTIL_CHECK_LIB(blkid, blkid_known_fstype)
-  elif test "x$with_fsprobe" = xvolume_id; then
-    UTIL_CHECK_LIB(volume_id, volume_id_encode_string)
-  fi
   if test "x$have_blkid" = xno && test "x$have_volume_id" = xno; then
     AC_MSG_ERROR([blkid or volume_id is needed to build util-linux-ng mount utilities])
   fi
@@ -210,8 +218,10 @@ else
   AC_MSG_WARN([non-linux system; do not build mount utilities])
   build_mount=no
 fi
+
 AM_CONDITIONAL(BUILD_MOUNT, test "x$build_mount" = xyes)
 
+
 dnl UTIL_PKG_STATIC(VARIABLE, MODULES)
 dnl ----------------------------------
 AC_DEFUN([UTIL_PKG_STATIC], [
index 1e33882abfb8b193c4c61800b388b40b35d91ba5..e09828e6cfbd7add5fd16e903129804a75120519 100644 (file)
@@ -1 +1,5 @@
-SUBDIRS = blkid
+SUBDIRS =
+
+if BUILD_LIBBLKID
+SUBDIRS += blkid
+endif