systemd has a nice feature that allows libs to be installed to /lib instead of 
/usr/lib based on the configure switch --with-rootlibdir= (and the value it is 
assigned to being different from --libdir=)

Please consider incorporating this into the libsubx build system?  Sample patch 
to do this is below:


--- a/configure.ac      2013-05-17 14:29:55.000000000 -0400
+++ b/configure.ac      2013-08-07 11:47:57.343764738 -0400
@@ -100,6 +100,10 @@
                        AC_CHECK_HEADERS([linux/netlink.h linux/filter.h], [], 
[AC_ERROR(["Linux netlink headers not found"])])
                fi
                AC_SUBST(USE_UDEV)
+       AC_ARG_WITH([rootlibdir],
+               [AC_HELP_STRING([--with-rootlibdir=DIR],[Root directory for 
libraries necessary for boot])],
+               [],[with_rootlibdir=${libdir}])
+               AC_SUBST([rootlibdir], [$with_rootlibdir])
        THREAD_CFLAGS="-pthread"
        LIBS="${LIBS} -pthread"
        AC_CHECK_HEADERS([poll.h])
--- a/libusb/Makefile.am        2013-06-13 08:33:20.000000000 -0400
+++ b/libusb/Makefile.am        2013-08-07 11:51:32.654768669 -0400
@@ -1,3 +1,13 @@
+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_S) -f 
$$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name 
$(DESTDIR)$(libdir)/$$libname && \
+               mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
+       fi
+endef
+
 all: libusb-1.0.la libusb-1.0.dll
 
 lib_LTLIBRARIES = libusb-1.0.la
@@ -25,6 +35,12 @@
        os/linux_netlink.c
 endif
 
+install-exec-hook:
+       libname=libusb-1.0.so && $(move-to-rootlibdir)
+
+uninstall-hook:
+       rm -f $(DESTDIR)$(rootlibdir)/libusb-1.0.so*
+
 endif
 
 if OS_DARWIN


---
Reply to this email directly or view it on GitHub:
https://github.com/libusbx/libusbx/issues/127
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to