$(ul_libblkid_la):
$(MAKE) -C $(ul_libblkid_builddir)
+
# uuid
ul_libuuid_srcdir = $(top_srcdir)/shlibs/uuid/src
ul_libuuid_builddir = $(top_builddir)/shlibs/uuid/src
$(ul_libuuid_la):
$(MAKE) -C $(ul_libuuid_builddir)
+
+# mount
+ul_libmount_srcdir = $(top_srcdir)/shlibs/mount/src
+ul_libmount_builddir = $(top_builddir)/shlibs/mount/src
+ul_libmount_la = $(top_builddir)/shlibs/mount/src/libmount.la
+
+# mount.h is generated by ./configure script and stored in build directory
+ul_libmount_incdir = $(ul_libmount_builddir)
+
+$(ul_libmount_la):
+ $(MAKE) -C $(ul_libmount_builddir)
LIBUUID_LT_MICRO=0
LIBUUID_VERSION_INFO=`expr $LIBUUID_LT_MAJOR + $LIBUUID_LT_MINOR`:$LIBUUID_LT_MICRO:$LIBUUID_LT_MINOR
+dnl libmount version
+LIBMOUNT_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
+LIBMOUNT_LT_MAJOR=1
+LIBMOUNT_LT_MINOR=1
+LIBMOUNT_LT_MICRO=0
+LIBMOUNT_VERSION_INFO=`expr $LIBMOUNT_LT_MAJOR + $LIBMOUNT_LT_MINOR`:$LIBMOUNT_LT_MICRO:$LIBMOUNT_LT_MINOR
+
# Check whether exec_prefix=/usr:
case $exec_prefix:$prefix in
NONE:NONE | NONE:/usr | /usr:*)
AC_ARG_VAR([BLKID_LIBS_STATIC], [-l options for linking statically with blkid])
+
+AC_ARG_ENABLE([libmount],
+ AS_HELP_STRING([--disable-libmount], [do not build libmount]),
+ [], enable_libmount=yes
+)
+AC_SUBST([LIBMOUNT_VERSION])
+AC_SUBST([LIBMOUNT_VERSION_INFO])
+AM_CONDITIONAL(BUILD_LIBMOUNT, test "x$enable_libmount" = xyes)
+
+
UTIL_CHECK_LIB(util, openpty)
UTIL_CHECK_LIB(termcap, tgetnum)
shlibs/blkid/src/topology/Makefile
shlibs/blkid/src/partitions/Makefile
shlibs/blkid/samples/Makefile
+shlibs/mount/mount.pc
+shlibs/mount/Makefile
+shlibs/mount/src/Makefile
+shlibs/mount/src/mount.h
shlibs/uuid/uuid.pc
shlibs/uuid/Makefile
shlibs/uuid/man/Makefile
if BUILD_LIBBLKID
SUBDIRS += blkid
endif
+
+if BUILD_LIBMOUNT
+SUBDIRS += mount
+endif
--- /dev/null
+test_*
+mount.h
--- /dev/null
+include $(top_srcdir)/config/include-Makefile.am
+
+SUBDIRS = src
+
+# pkg-config stuff
+pkgconfigdir = $(usrlib_execdir)/pkgconfig
+pkgconfig_DATA = mount.pc
+
+EXTRA_DIST = mount.pc.in
--- /dev/null
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@usrlib_execdir@
+includedir=@includedir@
+
+Name: mount
+Description: mount library
+Version: @LIBMOUNT_VERSION@
+Requires.private: blkid
+Cflags: -I${includedir}/mount
+Libs: -L${libdir} -lmount
--- /dev/null
+include $(top_srcdir)/config/include-Makefile.am
+
+AM_CPPFLAGS += -I$(ul_libmount_incdir) \
+ -I$(ul_libmount_srcdir) \
+ -I$(ul_libblkid_incdir)
+
+# includes
+mountincdir = $(includedir)/mount
+nodist_mountinc_HEADERS = mount.h
+
+usrlib_exec_LTLIBRARIES = libmount.la
+libmount_la_SOURCES = $(mountinc_HEADERS)
+
+nodist_libmount_la_SOURCES = mount.h
+
+libmount_la_LIBADD = $(ul_libblkid_la)
+
+libmount_la_DEPENDENCIES = $(libmount_la_LIBADD) mount.sym mount.h.in
+
+libmount_la_LDFLAGS = -Wl,--version-script=$(ul_libmount_srcdir)/mount.sym \
+ -version-info $(LIBMOUNT_VERSION_INFO)
+
+tests =
+
+EXTRA_DIST = mount.sym mount.h.in
+CLEANFILES = $(tests)
+
+tests: all $(tests)
+test_%: %.c
+ $(COMPILE) -DTEST_PROGRAM $< .libs/libmount.a -o $@ $(BLKID_LIBS)
+
+
+# move lib from $(usrlib_execdir) to $(libdir) if needed
+install-exec-hook:
+ if test "$(usrlib_execdir)" != "$(libdir)"; then \
+ mkdir -p $(DESTDIR)$(libdir); \
+ mv $(DESTDIR)$(usrlib_execdir)/libmount.so.* $(DESTDIR)$(libdir); \
+ so_img_name=$$(readlink $(DESTDIR)$(usrlib_execdir)/libmount.so); \
+ so_img_rel_target=$$(echo $(usrlib_execdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
+ (cd $(DESTDIR)$(usrlib_execdir) && \
+ rm -f libmount.so && \
+ $(LN_S) $$so_img_rel_target$(libdir)/$$so_img_name libmount.so); \
+ fi
+
+uninstall-hook:
+ rm -f $(DESTDIR)$(libdir)/libmount.so*
--- /dev/null
+/*
+ * mount.h - libmount API
+ *
+ * Copyright (C) 2008-2009 Karel Zak <kzak@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _LIBMOUNT_MOUNT_H
+#define _LIBMOUNT_MOUNT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define LIBMOUNT_VERSION "@LIBMOUNT_VERSION@"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _LIBMOUNT_MOUNT_H */
--- /dev/null
+/*
+ * The symbol versioning ensures that a new application requiring symbol foo()
+ * can't run with old libblkid.so not providing foo() - the global SONAME
+ * version info can't enforce this since we never change the SONAME.
+ */
+MOUNT_2.18 {
+global:
+ dummy;
+local:
+ *;
+};