diff options
author | Matt Wilson <msw@amazon.com> | 2012-07-05 11:00:28 +0100 |
---|---|---|
committer | Matt Wilson <msw@amazon.com> | 2012-07-05 11:00:28 +0100 |
commit | f9cc7456425b542feb4a2e6f4bd5a7db44f5eaf0 (patch) | |
tree | 6aa225f4c238b30bbf2f27878116f0b492a6cf69 /tools/libfsimage/Rules.mk | |
parent | ed367d4f9de58269f8be356268d382060f9f7e42 (diff) | |
download | xen-f9cc7456425b542feb4a2e6f4bd5a7db44f5eaf0.tar.gz xen-f9cc7456425b542feb4a2e6f4bd5a7db44f5eaf0.tar.bz2 xen-f9cc7456425b542feb4a2e6f4bd5a7db44f5eaf0.zip |
tools: honour --libdir when it is passed to ./configure
Currently shared libraries are automatically installed into /usr/lib
or /usr/lib64, depending on the supplied --prefix value and
$(XEN_TARGET_ARCH). Some systems, like recent Debian and Ubuntu releases,
do not use /usr/lib64, but instead /usr/lib/x86_64-linux-gnu.
With this change, packagers can supply the desired location for shared
libraries on the ./configure command line. Packagers need to note that
the default behaviour on 64-bit Linux systems will be to install shared
libraries in /usr/lib, not /usr/lib64, unless a --libdir value is provided
to ./configure.
Additionally, the libfsimage plugins are now loaded explicitly from
$LIBDIR/fs, removing platform-based decision trees in code.
Signed-off-by: Matt Wilson <msw@amazon.com>
Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- resolve rejects in configure by rerunning autogen.sh. Dropped changes
to remove m4/default_lib.m4 and update m4/pkg.m4 since they cause LIBDIR=/lib
instead of /usr/lib. Reran ./autogen.sh after that too ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libfsimage/Rules.mk')
-rw-r--r-- | tools/libfsimage/Rules.mk | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/tools/libfsimage/Rules.mk b/tools/libfsimage/Rules.mk index a65d532a68..e4b2a9158e 100644 --- a/tools/libfsimage/Rules.mk +++ b/tools/libfsimage/Rules.mk @@ -1,17 +1,12 @@ include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ +CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ -DFSIMAGE_FSDIR=\"$(FSDIR)\" CFLAGS += -Werror -D_GNU_SOURCE LDFLAGS += -L../common/ PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y)) -FSDIR-$(CONFIG_Linux) = $(LIBDIR)/fs/$(FS) -FSDIR-$(CONFIG_SunOS)-x86_64 = $(PREFIX)/lib/fs/$(FS)/64 -FSDIR-$(CONFIG_SunOS)-x86_32 = $(PREFIX)/lib/fs/$(FS)/ -FSDIR-$(CONFIG_SunOS) = $(FSDIR-$(CONFIG_SunOS)-$(XEN_TARGET_ARCH)) -FSDIR-$(CONFIG_NetBSD) = $(LIBDIR)/fs/$(FS) -FSDIR = $(FSDIR-y) +FSDIR = $(LIBDIR)/fs FSLIB = fsimage.so @@ -20,8 +15,8 @@ fs-all: $(FSLIB) .PHONY: fs-install fs-install: fs-all - $(INSTALL_DIR) $(DESTDIR)$(FSDIR) - $(INSTALL_PROG) $(FSLIB) $(DESTDIR)$(FSDIR) + $(INSTALL_DIR) $(DESTDIR)$(FSDIR)/$(FS) + $(INSTALL_PROG) $(FSLIB) $(DESTDIR)$(FSDIR)/$(FS) $(FSLIB): $(PIC_OBJS) $(CC) $(LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS) $(APPEND_LDFLAGS) |