From acb4ecaa0111a428b2c443e0db937caa09696923 Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Mon, 22 Aug 2011 09:46:59 -0400 Subject: [PATCH] libsemanage: python wrapper makefile changes Allow Change libsemanage Makefile to be able to build by default and to build if you change the version of Python Signed-off-by: Eric Paris Acked-by: Dan Walsh --- libsemanage/src/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile index d21e972e..d9120c09 100644 --- a/libsemanage/src/Makefile +++ b/libsemanage/src/Makefile @@ -10,7 +10,8 @@ LIBDIR ?= $(PREFIX)/lib SHLIBDIR ?= $(PREFIX)/lib INCLUDEDIR ?= $(PREFIX)/include PYLIBVER ?= $(shell $(PYTHON) -c 'import sys;print("python%d.%d" % sys.version_info[0:2])') -PYINC ?= $(shell pkg-config --cflags `basename $(PYTHON)`) +PYINC ?= $(shell pkg-config --cflags $(PYPREFIX)) +PYTHONLIBDIR ?= $(shell pkg-config --libs $(PYPREFIX)) PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER) RUBYLIBVER ?= $(shell ruby -e 'print RUBY_VERSION.split(".")[0..1].join(".")') RUBYPLATFORM ?= $(shell ruby -e 'print RUBY_PLATFORM') @@ -76,7 +77,7 @@ $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT) $(CC) $(filter-out -Werror, $(CFLAGS)) -I$(RUBYINC) -fPIC -DSHARED -c -o $@ $< $(SWIGSO): $(SWIGLOBJ) - $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -L$(LIBDIR) -Wl,-soname,$@,-z,defs + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -L$(LIBDIR) $(PYTHONLIBDIR) -Wl,-soname,$@,-z,defs $(SWIGRUBYSO): $(SWIGRUBYLOBJ) $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lsemanage -L$(LIBDIR) -Wl,-soname,$@