summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2013-05-14 16:07:03 -0400
committerVijay Bellur <vbellur@redhat.com>2013-05-19 06:13:01 -0700
commit10fbae681e072dd6359bf7a8c56e93c541c83b0b (patch)
tree738c3f6793855054741b08566de14ada64bbc7d4 /configure.ac
parent2b65c50554ec434a6ec9aecaea5d9885cf2aadf8 (diff)
configure.ac: build glupy with installed python
IOW with more than just python2.6. Python2.7 is certainly what's on the vast majority of non-RHEL systems that are out there. Also our rpm.t regression test will build on epel-5 under mock; RHEL5 has Python2.4. Change-Id: I09c95c1fb6b3498e910ad239c4f0af7f786c3700 BUG: 961856 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/5007 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac34
1 files changed, 21 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index 02dd5552db9..cc53b52583e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -122,6 +122,12 @@ AC_CONFIG_FILES([Makefile
xlators/system/Makefile
xlators/system/posix-acl/Makefile
xlators/system/posix-acl/src/Makefile
+ xlators/nfs/Makefile
+ xlators/nfs/server/Makefile
+ xlators/nfs/server/src/Makefile
+ xlators/mgmt/Makefile
+ xlators/mgmt/glusterd/Makefile
+ xlators/mgmt/glusterd/src/Makefile
cli/Makefile
cli/src/Makefile
doc/Makefile
@@ -139,12 +145,6 @@ AC_CONFIG_FILES([Makefile
extras/LinuxRPM/Makefile
contrib/fuse-util/Makefile
contrib/uuid/uuid_types.h
- xlators/nfs/Makefile
- xlators/nfs/server/Makefile
- xlators/nfs/server/src/Makefile
- xlators/mgmt/Makefile
- xlators/mgmt/glusterd/Makefile
- xlators/mgmt/glusterd/src/Makefile
glusterfs-api.pc
api/Makefile
api/src/Makefile
@@ -639,14 +639,22 @@ if test "x$LIBAIO" != "x"; then
BUILD_LIBAIO=yes
fi
-
-BUILD_GLUPY=no
-AC_CHECK_LIB([python2.6],[PyImport_Import],[BUILD_GLUPY=yes])
-
-if test "x$BUILD_GLUPY" = "xyes"; then
- GLUPY_SUBDIR=glupy
-fi
+AM_PATH_PYTHON()
+ if echo $PYTHON_VERSION | grep ^2; then
+ BUILD_PYTHON_INC=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_inc()"`
+ BUILD_PYTHON_LIB=python$PYTHON_VERSION
+ GLUPY_SUBDIR=glupy
+ GLUPY_SUBDIR_MAKEFILE=xlators/features/glupy/Makefile
+ GLUPY_SUBDIR_SRC_MAKEFILE=xlators/features/glupy/src/Makefile
+ echo "building glupy with -isystem $BUILD_PYTHON_INC -l $BUILD_PYTHON_LIB"
+ else
+ AC_MSG_ERROR([only python 2.x is supported])
+ fi
+AC_SUBST(BUILD_PYTHON_INC)
+AC_SUBST(BUILD_PYTHON_LIB)
AC_SUBST(GLUPY_SUBDIR)
+AC_SUBST(GLUPY_SUBDIR_MAKEFILE)
+AC_SUBST(GLUPY_SUBDIR_SRC_MAKEFILE)
AC_SUBST(GF_HOST_OS)
AC_SUBST([GF_GLUSTERFS_LIBS])