aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2009-04-22 09:18:30 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-04-22 09:18:30 -0400
commit14b596d40997c7e55ec8928bd222787f96808a2b (patch)
tree029be7ed025b2888679f2c85b45719136b40c1b3 /configure.in
parent27c3e539b65e1606a72c79e3b1c154b77daeb5e5 (diff)
downloade2fsprogs-14b596d40997c7e55ec8928bd222787f96808a2b.tar.gz
e2fsprogs-14b596d40997c7e55ec8928bd222787f96808a2b.tar.xz
e2fsprogs-14b596d40997c7e55ec8928bd222787f96808a2b.zip
configure.in: add --disable-libblkid option
Add an option to switch between the private (in-tree) libblkid and public (in-system installed) library. The private version is still enabled by default. If --disable-libblkid is specified the findfs(8) program, which is a variant of tune2fs, is also not built or installed. Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in55
1 files changed, 54 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index caf2cb45..781519c2 100644
--- a/configure.in
+++ b/configure.in
@@ -136,7 +136,7 @@ dnl parsing configuration opions, which may modify these
dnl
LIB_EXT=.a
STATIC_LIB_EXT=.a
-PROFILE_LIB_EXT=.a
+PROFILED_LIB_EXT=.a
dnl
dnl set $(LDFLAGS) from --with-ldopts=value
dnl
@@ -379,6 +379,59 @@ TEST_IO_CMT=
)
AC_SUBST(TEST_IO_CMT)
dnl
+dnl handle --disable-libblkid
+dnl
+PKG_PROG_PKG_CONFIG
+LIBBLKID=
+DEPLIBBLKID=
+STATIC_LIBBLKID=
+DEPSTATIC_LIBBLKID=
+PROFILED_LIBBLKID=
+DEPPROFILED_LIBBLKID=
+BLKID_CMT=
+AC_ARG_ENABLE([libblkid],
+[ --disable-libblkid do not build private blkid library],
+if test "$enableval" = "no"
+then
+ if test -z "$PKG_CONFIG"; then
+ AC_MSG_ERROR([pkg-config not installed; please install it.])
+ fi
+
+ AC_CHECK_LIB(blkid, blkid_get_cache,
+ [LIBBLKID=`$PKG_CONFIG --libs blkid`;
+ STATIC_LIBBLKID=`$PKG_CONFIG --static --libs blkid`],
+ [AC_MSG_ERROR([external blkid library not found])],
+ [$LIBBLKID])
+ BLKID_CMT=#
+ AC_MSG_RESULT([Disabling private blkid library])
+else
+ LIBBLKID='$(LIB)/libblkid'$LIB_EXT
+ DEPLIBBLKID=$LIBBLKID
+ STATIC_LIBBLKID='$(LIB)/libblkid'$STATIC_LIB_EXT
+ DEPSTATIC_LIBBLKID=$STATIC_LIBBLKID
+ PROFILED_LIBBLKID='$(LIB)/libblkid'$PROFILED_LIB_EXT
+ DEPPROFILED_LIBBLKID=$PROFILED_LIBBLKID
+ AC_DEFINE(CONFIG_BUILD_FINDFS)
+ AC_MSG_RESULT([Enabling private blkid library])
+fi
+,
+LIBBLKID='$(LIB)/libblkid'$LIB_EXT
+DEPLIBBLKID=$LIBBLKID
+STATIC_LIBBLKID='$(LIB)/libblkid'$STATIC_LIB_EXT
+DEPSTATIC_LIBBLKID=$STATIC_LIBBLKID
+PROFILED_LIBBLKID='$(LIB)/libblkid'$PROFILED_LIB_EXT
+DEPPROFILED_LIBBLKID=$PROFILED_LIBBLKID
+AC_DEFINE(CONFIG_BUILD_FINDFS)
+AC_MSG_RESULT([Enabling private blkid library by default])
+)
+AC_SUBST(LIBBLKID)
+AC_SUBST(DEPLIBBLKID)
+AC_SUBST(STATIC_LIBBLKID)
+AC_SUBST(DEPSTATIC_LIBBLKID)
+AC_SUBST(PROFILED_LIBBLKID)
+AC_SUBST(DEPPROFILED_LIBBLKID)
+AC_SUBST(BLKID_CMT)
+dnl
dnl handle --enable-debugfs
dnl
AC_ARG_ENABLE([debugfs],