From 572fefeb90804fde0a537ebbe0fccb5c0295d9f1 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Fri, 22 May 2009 14:44:59 +0000 Subject: [PATCH] Rename liblvm.so to liblvm2app.so and use configure --enable-applib. --- Makefile.in | 8 ++++++-- VERSION | 2 +- WHATS_NEW | 3 ++- configure | 22 ++++++++++++++++++++++ configure.in | 13 +++++++++++++ liblvm/Makefile.in | 2 +- test/api/Makefile.in | 4 ++-- 7 files changed, 47 insertions(+), 7 deletions(-) diff --git a/Makefile.in b/Makefile.in index d9c93d099..fa1ba8041 100644 --- a/Makefile.in +++ b/Makefile.in @@ -22,7 +22,11 @@ ifeq ("@INTL@", "yes") SUBDIRS += po endif -SUBDIRS += lib tools daemons libdm liblvm +SUBDIRS += lib tools daemons libdm + +ifeq ("@APPLIB@", "yes") + SUBDIRS += liblvm +endif ifeq ($(MAKECMDGOALS),distclean) SUBDIRS += daemons/clvmd \ @@ -46,7 +50,7 @@ libdm: include lib: libdm liblvm: lib daemons: lib tools -tools: lib device-mapper liblvm +tools: lib device-mapper po: tools daemons libdm.device-mapper: include.device-mapper diff --git a/VERSION b/VERSION index eafa04b2c..4fb54c9dc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.02.46-cvs (2009-05-21) +2.02.47-cvs (2009-05-22) diff --git a/WHATS_NEW b/WHATS_NEW index 6b4882564..671438e5a 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ -Version 2.02.47 - 21st May 2009 +Version 2.02.47 - 22nd May 2009 =============================== + Rename liblvm.so to liblvm2app.so and use configure --enable-applib. Reinstate version in liblvm2cmd.so soname. (2.02.44) Version 2.02.46 - 21st May 2009 diff --git a/configure b/configure index 6a6858295..2b8d9d757 100755 --- a/configure +++ b/configure @@ -690,9 +690,11 @@ CLDWHOLEARCHIVE CLDNOWHOLEARCHIVE CLDFLAGS BUILD_DMEVENTD +APPLIB MODPROBE_CMD MSGFMT LVM2CMD_LIB +LVM2APP_LIB GENHTML LCOV CPG_LIBS @@ -800,6 +802,7 @@ enable_devmapper enable_compat enable_ioctl enable_o_direct +enable_applib enable_cmdlib enable_pkgconfig enable_fsadm @@ -1467,6 +1470,7 @@ Optional Features: --enable-compat Enable support for old device-mapper versions --disable-driver Disable calls to device-mapper in the kernel --disable-o_direct Disable O_DIRECT + --enable-applib Build application library --enable-cmdlib Build shared command library --enable-pkgconfig Install pkgconfig support --enable-fsadm Enable fsadm @@ -9706,6 +9710,23 @@ _ACEOF fi +################################################################################ +{ $as_echo "$as_me:$LINENO: checking whether to build liblvm2app.so application library" >&5 +$as_echo_n "checking whether to build liblvm2app.so application library... " >&6; } +# Check whether --enable-applib was given. +if test "${enable_applib+set}" = set; then + enableval=$enable_applib; APPLIB=$enableval +else + APPLIB=no +fi + +{ $as_echo "$as_me:$LINENO: result: $APPLIB" >&5 +$as_echo "$APPLIB" >&6; } + +test x$APPLIB = xyes \ + && LVM2APP_LIB=-llvm2app \ + || LVM2APP_LIB= + ################################################################################ { $as_echo "$as_me:$LINENO: checking whether to compile liblvm2cmd.so" >&5 $as_echo_n "checking whether to compile liblvm2cmd.so... " >&6; } @@ -12657,6 +12678,7 @@ LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '.' '{print $3}'` + ################################################################################ diff --git a/configure.in b/configure.in index aa3faa24d..eb6278d48 100644 --- a/configure.in +++ b/configure.in @@ -423,6 +423,18 @@ if test x$ODIRECT = xyes; then AC_DEFINE([O_DIRECT_SUPPORT], 1, [Define to 1 to enable O_DIRECT support.]) fi +################################################################################ +dnl -- Enable liblvm2app.so +AC_MSG_CHECKING(whether to build liblvm2app.so application library) +AC_ARG_ENABLE(applib, + [ --enable-applib Build application library], + APPLIB=$enableval, APPLIB=no) +AC_MSG_RESULT($APPLIB) +AC_SUBST([LVM2APP_LIB]) +test x$APPLIB = xyes \ + && LVM2APP_LIB=-llvm2app \ + || LVM2APP_LIB= + ################################################################################ dnl -- Enable cmdlib AC_MSG_CHECKING(whether to compile liblvm2cmd.so) @@ -747,6 +759,7 @@ LVM_MINOR=`echo "$VER" | $AWK -F '.' '{print $2}'` LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '.' '{print $3}'` ################################################################################ +AC_SUBST(APPLIB) AC_SUBST(BUILD_DMEVENTD) AC_SUBST(CFLAGS) AC_SUBST(CFLOW_CMD) diff --git a/liblvm/Makefile.in b/liblvm/Makefile.in index 3ab4950f1..fdd2eccc5 100644 --- a/liblvm/Makefile.in +++ b/liblvm/Makefile.in @@ -19,7 +19,7 @@ VPATH = @srcdir@ SOURCES =\ lvm_base.c -LIB_NAME = liblvm +LIB_NAME = liblvm2app LIB_VERSION = $(LIB_VERSION_LVM) VERSIONED_SHLIB = $(LIB_NAME).$(LIB_SUFFIX).$(LIB_VERSION_LVM) diff --git a/test/api/Makefile.in b/test/api/Makefile.in index 8358f8879..11eb1a509 100644 --- a/test/api/Makefile.in +++ b/test/api/Makefile.in @@ -25,7 +25,7 @@ endif TARGETS = test -LVMLIBS = -llvm -ldevmapper +LVMLIBS = @LVM2APP_LIB@ -ldevmapper DEFS += -D_REENTRANT CFLAGS += -fno-strict-aliasing @@ -35,6 +35,6 @@ include $(top_srcdir)/make.tmpl LDFLAGS = -L$(top_srcdir)/libdm -L$(top_srcdir)/liblvm CLDFLAGS = -L$(top_srcdir)/libdm -L$(top_srcdir)/liblvm -test: $(OBJECTS) $(top_srcdir)/liblvm/liblvm.so $(top_srcdir)/libdm/libdevmapper.so +test: $(OBJECTS) $(top_srcdir)/liblvm/liblvm2app.so $(top_srcdir)/libdm/libdevmapper.so $(CC) -o test $(OBJECTS) $(CFLAGS) $(LDFLAGS) $(LVMLIBS) $(LIBS) -- 2.43.5