From 6809e7b563bd7a2ebbf41176b639c995a7d2d663 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 27 Aug 2008 11:55:39 +0200 Subject: [PATCH] blkid: add basic configure.ac stuff and blkid.pc Note, the configure.in stuff is incomplete -- but it's seem we can remove the libbevmapper crap from blkid at all. So this code autoconf is temporary only. Signed-off-by: Karel Zak --- configure.ac | 37 +++++++++++++++++++++++++++++++++++++ libs/blkid/Makefile.am | 6 +++++- libs/blkid/blkid.pc.in | 12 ++++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 libs/blkid/blkid.pc.in diff --git a/configure.ac b/configure.ac index 1f83fc7b..aa145cfc 100644 --- a/configure.ac +++ b/configure.ac @@ -606,6 +606,42 @@ else esac fi +# TODO remove devmapper from blkid +# +STATIC_BLKID_DEVMAPPER_LIBS='' +AC_ARG_ENABLE([blkid-devmapper], + AS_HELP_STRING([--enable-blkid-devmapper], [build with device-mapper support]), + [], with_blkid-devmapper=no +) +if test x$with_devmapper = xno; then + AM_CONDITIONAL(HAVE_DEVMAPPER, false) + DEVMAPPER_LIBS_STATIC='' + DEVMAPPER_REQ='' + DEVMAPPER_PC_LIBS='' +else + UTIL_CHECK_LIB(devmapper, dm_tree_create) + case $with_blkid-devmapper:$have_blkid-devmapper in + yes:no) AC_MSG_ERROR([devmapper selected but libdevmapper not found]);; + esac + UTIL_PKG_STATIC([DEVMAPPER_LIBS_STATIC], [devmapper]) + DEVMAPPER_REQ="devmapper" + DEVMAPPER_PC_LIBS="-ldevmapper" + + # work around stupid devmapper.pc bug in Debian + case "$DEVMAPPER_LIBS_STATIC" in + *pthread*) + ;; + *) + AC_MSG_WARN([Working around Debian bug 390243...]) + DEVMAPPER_LIBS_STATIC="-pthread $DEVMAPPER_LIBS_STATIC" + ;; + esac +fi + +AC_SUBST(DEVMAPPER_REQ) +AC_SUBST(DEVMAPPER_PC_LIBS) +AC_SUBST(DEVMAPPER_LIBS_STATIC) + AC_ARG_ENABLE([schedutils], AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, teskset]), @@ -715,6 +751,7 @@ include/Makefile lib/Makefile libs/Makefile libs/blkid/Makefile +libs/blkid/blkid.pc login-utils/Makefile misc-utils/Makefile mount/Makefile diff --git a/libs/blkid/Makefile.am b/libs/blkid/Makefile.am index 6702b5b3..28558d43 100644 --- a/libs/blkid/Makefile.am +++ b/libs/blkid/Makefile.am @@ -1,3 +1,7 @@ include $(top_srcdir)/config/include-Makefile.am -EXTRA_DIST = README.fsprobe +# pkg-config stuff +pkgconfigdir = $(usrlibexecdir)/pkgconfig +pkgconfig_DATA = blkid.pc + +EXTRA_DIST = README.blkid blkid.pc blkid.pc.in diff --git a/libs/blkid/blkid.pc.in b/libs/blkid/blkid.pc.in new file mode 100644 index 00000000..5195539e --- /dev/null +++ b/libs/blkid/blkid.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: blkid +Description: Block device id library +Version: @VERSION@ +Requires: uuid @DEVMAPPER_REQ@ +Cflags: -I${includedir} +Libs: -L${libdir} -lblkid +Libs.private: @DEVMAPPER_PC_LIBS@ -- 2.39.5