summaryrefslogtreecommitdiff
path: root/src/libudev
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2013-01-05 09:59:23 -0500
committerAnthony G. Basile <blueness@gentoo.org>2013-01-21 10:23:19 -0500
commitcb44e7c8911cc5a9637c774da0081eb9aa8e2810 (patch)
tree625de102337b05364907bd1d70e2231f458935f5 /src/libudev
parent7c9974f31a10154b6c9c68b100dc62482c93a5b1 (diff)
Make all udev tools dynamically link to libudev.so
Move libudev.so back to $(rootlibdir) for lvm2 support, and have all udev tools dynamically link to it. The symbol versioning and hidden-visibility on libudev were modified accordingly: we rebase against the public LIBUDEV_196 symbol versioning, and marked all other symbols (which used to be local) as LIBUDEV_internal. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/libudev')
-rw-r--r--src/libudev/Makefile.am26
-rw-r--r--src/libudev/libudev.sym7
2 files changed, 23 insertions, 10 deletions
diff --git a/src/libudev/Makefile.am b/src/libudev/Makefile.am
index dfc8cb17d6..007f0defbd 100644
--- a/src/libudev/Makefile.am
+++ b/src/libudev/Makefile.am
@@ -4,6 +4,16 @@ LIBUDEV_CURRENT=3
LIBUDEV_REVISION=0
LIBUDEV_AGE=2
+define move-to-rootlibdir
+ if test "$(libdir)" != "$(rootlibdir)"; then \
+ $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
+ so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
+ so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
+ ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
+ mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
+ fi
+endef
+
AM_CPPFLAGS = \
-include $(top_builddir)/config.h \
-DUDEV_CONF_FILE=\"$(udevconffile)\" \
@@ -56,10 +66,6 @@ noinst_HEADERS = \
include_HEADERS = \
libudev.h
-libudev_la_CFLAGS = \
- $(AM_CFLAGS) \
- -fvisibility=hidden
-
libudev_la_LDFLAGS = \
$(AM_LDFLAGS) \
-version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
@@ -67,13 +73,11 @@ libudev_la_LDFLAGS = \
libudev_private_la_SOURCES =\
- $(libudev_la_SOURCES) \
libudev-device-private.c \
libudev-queue-private.c
-libudev_private_la_CFLAGS = \
- $(AM_CFLAGS) \
- -fvisibility=default
+libudev_private_la_LIBADD =\
+ libudev.la
noinst_LTLIBRARIES = \
libudev-private.la
@@ -87,3 +91,9 @@ EXTRA_DIST = \
CLEANFILES = \
libudev.pc
+
+install-exec-hook:
+ libname=libudev.so && $(move-to-rootlibdir)
+
+uninstall-hook:
+ rm -f $(DESTDIR)$(rootlibdir)/libudev.so*
diff --git a/src/libudev/libudev.sym b/src/libudev/libudev.sym
index df6a1aeddf..261df13ed3 100644
--- a/src/libudev/libudev.sym
+++ b/src/libudev/libudev.sym
@@ -92,8 +92,6 @@ global:
udev_set_userdata;
udev_unref;
udev_util_encode_string;
-local:
- *;
};
LIBUDEV_189 {
@@ -108,3 +106,8 @@ global:
udev_hwdb_unref;
udev_hwdb_get_properties_list_entry;
} LIBUDEV_189;
+
+LIBUDEV_internal {
+global:
+ *;
+} LIBUDEV_196;