From c0ca8aee8085bce0418c6e0cfc3504bc59f60cdb Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Thu, 7 May 2015 18:29:31 +0200 Subject: glupy: fix tuntime search path and python module directory layo ut 1) The glupy.so xlator should embed the runtime search path for the python libraries. Unfortunately, python-config does not gives the appprioate flags, therefore we need to also use pkg-config to obtain them 2) Fix the glupy python module directory layout so that python can import the module without problem That two fixes seems to let glupy.t pass on NetBSD again. Backport of: I397aa726ab8bf7d91fa0d6d870a30910a5f4a5d9 BUG: 1212676 Change-Id: Ie48916d71f0f1a357d65c3c22b5e7d7276d720db Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/10650 Reviewed-by: Kaleb KEITHLEY Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Vijay Bellur --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index eb72eec09fe..29e0e269b0c 100644 --- a/configure.ac +++ b/configure.ac @@ -128,6 +128,7 @@ AC_CONFIG_FILES([Makefile xlators/features/glupy/src/Makefile xlators/features/glupy/src/setup.py xlators/features/glupy/src/__init__.py + xlators/features/glupy/src/glupy/Makefile xlators/features/locks/Makefile xlators/features/locks/src/Makefile xlators/features/quota/Makefile @@ -1128,9 +1129,12 @@ saved_CFLAGS=$CFLAGS saved_CPPFLAGS=$CPPFLAGS saved_LDFLAGS=$LDFLAGS +# Use pkg-config to get runtime search patch missing from ${PYTHON}-config +# Just do "true" on failure so that configure does not bail out +PKG_CHECK_MODULES([PYTHON], "pythonxx-$PYTHON_VERSION",,true) CFLAGS="`${PYTHON}-config --cflags`" CPPFLAGS=$CFLAGS -LDFLAGS="-L`${PYTHON}-config --prefix`/lib -L`${PYTHON}-config --prefix`/$libdir `${PYTHON}-config --ldflags`" +LDFLAGS="${PYTHON_LIBS} -L`${PYTHON}-config --prefix`/lib -L`${PYTHON}-config --prefix`/$libdir `${PYTHON}-config --ldflags`" AC_CHECK_HEADERS([python$PYTHON_VERSION/Python.h],[have_Python_h=yes],[]) AC_ARG_ENABLE([glupy], -- cgit