diff options
author | Ken Raeburn <raeburn@mit.edu> | 2009-01-05 18:19:32 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2009-01-05 18:19:32 +0000 |
commit | 85974116f8fbd44bb18c97a7d46b99ed0dd25929 (patch) | |
tree | 6b3a05f34fed5dccae1d09abe22d6f6f5c822d8e | |
parent | 8deff0f691ec1ae7d9fa3fb8f5f977a44304de62 (diff) | |
download | krb5-85974116f8fbd44bb18c97a7d46b99ed0dd25929.tar.gz krb5-85974116f8fbd44bb18c97a7d46b99ed0dd25929.tar.xz krb5-85974116f8fbd44bb18c97a7d46b99ed0dd25929.zip |
Build against Python 2.5 as well as 2.3. Long term, should use python-config
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21700 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/configure.in | 7 | ||||
-rw-r--r-- | src/plugins/locate/python/Makefile.in | 2 | ||||
-rw-r--r-- | src/plugins/locate/python/py-locate.c | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/configure.in b/src/configure.in index 45798d843..0f5af410c 100644 --- a/src/configure.in +++ b/src/configure.in @@ -1024,7 +1024,12 @@ fi AC_SUBST(ldap_plugin_dir) AC_SUBST(LDAP) -AC_CHECK_HEADERS(Python.h python2.3/Python.h) +dnl We really should look for and use python-config. +PYTHON_LIB= +AC_CHECK_HEADERS(Python.h python2.3/Python.h python2.5/Python.h) +AC_CHECK_LIB(python2.3,main,[PYTHON_LIB=-lpython2.3], + AC_CHECK_LIB(python2.5,main,[PYTHON_LIB=-lpython2.5])) +AC_SUBST(PYTHON_LIB) dnl dnl Kludge for simple server --- FIXME is this the best way to do this? diff --git a/src/plugins/locate/python/Makefile.in b/src/plugins/locate/python/Makefile.in index ab369919b..9daeae010 100644 --- a/src/plugins/locate/python/Makefile.in +++ b/src/plugins/locate/python/Makefile.in @@ -11,7 +11,7 @@ RELDIR=../plugins/locate/python MODULE_INSTALL_DIR = $(KRB5_LIBKRB5_MODULE_DIR) SHLIB_EXPDEPS= $(KRB5_DEPLIB) $(SUPPORT_DEPLIB) -SHLIB_EXPLIBS= -lpython2.3 $(KRB5_LIB) $(SUPPORT_LIB) +SHLIB_EXPLIBS= @PYTHON_LIB@ $(KRB5_LIB) $(SUPPORT_LIB) SHLIB_DIRS=-L$(TOPLIBD) SHLIB_RDIRS=$(KRB5_LIBDIR) diff --git a/src/plugins/locate/python/py-locate.c b/src/plugins/locate/python/py-locate.c index 36ddaedad..5167230a0 100644 --- a/src/plugins/locate/python/py-locate.c +++ b/src/plugins/locate/python/py-locate.c @@ -66,6 +66,8 @@ #include <Python.h> #elif HAVE_PYTHON2_3_PYTHON_H #include <python2.3/Python.h> +#elif HAVE_PYTHON2_5_PYTHON_H +#include <python2.5/Python.h> #else #error "Where's the Python header file?" #endif |