From: Benjamin Marzinski Date: Mon, 3 Aug 2009 22:02:29 +0000 (-0500) Subject: multipath-tools: install libraries to /lib64 where appriopriate X-Git-Tag: 0.4.9~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f9c759d35aeda46951891343a138663313a3d63;p=platform%2Fupstream%2Fmultipath-tools.git multipath-tools: install libraries to /lib64 where appriopriate Multipath currently installs all of it's libraries to /lib, even on 64-bit machines with a /lib64 directory. With this patch, multipath will install the libraries under /lib64 if it exists. This can be overridden by running # make LIB= Signed-off-by: Benjamin Marzinski --- diff --git a/Makefile.inc b/Makefile.inc index 1fe9782..7ec25d5 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -13,6 +13,14 @@ ifeq ($(TOPDIR),) TOPDIR = .. endif +ifndef LIB + ifeq ($(shell test -d /lib64 && echo 1),1) + LIB=lib64 + else + LIB=lib + endif +endif + prefix = exec_prefix = $(prefix) bindir = $(exec_prefix)/sbin @@ -21,14 +29,14 @@ multipathdir = $(TOPDIR)/libmultipath mandir = $(prefix)/usr/share/man/man8 man5dir = $(prefix)/usr/share/man/man5 rcdir = $(prefix)/etc/init.d -syslibdir = $(prefix)/lib -libdir = $(prefix)/lib/multipath +syslibdir = $(prefix)/$(LIB) +libdir = $(prefix)/$(LIB)/multipath GZIP = /bin/gzip -9 -c INSTALL_PROGRAM = install OPTFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes -CFLAGS = $(OPTFLAGS) -fPIC +CFLAGS = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\" SHARED_FLAGS = -shared %.o: %.c diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h index 49d2227..84e5d6b 100644 --- a/libmultipath/defaults.h +++ b/libmultipath/defaults.h @@ -1,6 +1,6 @@ #define DEFAULT_GETUID "/lib/udev/scsi_id --whitelisted --device=/dev/%n" #define DEFAULT_UDEVDIR "/dev" -#define DEFAULT_MULTIPATHDIR "/lib/multipath" +#define DEFAULT_MULTIPATHDIR "/" LIB_STRING "/multipath" #define DEFAULT_SELECTOR "round-robin 0" #define DEFAULT_FEATURES "0" #define DEFAULT_HWHANDLER "0"