Build against Python 2.5 as well as 2.3. Long term, should use python-config
authorKen Raeburn <raeburn@mit.edu>
Mon, 5 Jan 2009 18:19:32 +0000 (18:19 +0000)
committerKen Raeburn <raeburn@mit.edu>
Mon, 5 Jan 2009 18:19:32 +0000 (18:19 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21700 dc483132-0cff-0310-8789-dd5450dbe970

src/configure.in
src/plugins/locate/python/Makefile.in
src/plugins/locate/python/py-locate.c

index 45798d8438a9d1c8312e5b0ed76da6dc46ca64c2..0f5af410c9a4d50b2cfd4538b44f4b6401743f7a 100644 (file)
@@ -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?
index ab369919b90c2a299550a13df84bc6bc7a354670..9daeae01035f379c5f5af1c514dac9015dd846a4 100644 (file)
@@ -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)
index 36ddaedad4dde61740d05e0a79def551816acef7..5167230a000ab84605af1156a3a1e78b0b6bbce4 100644 (file)
@@ -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