r26666: python: Prefer newer Python versions as they use const properly.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 5 Jan 2008 20:00:07 +0000 (14:00 -0600)
committerStefan Metzmacher <metze@samba.org>
Sat, 5 Jan 2008 14:06:04 +0000 (08:06 -0600)
source/scripting/python/config.m4

index a629aa8f924abb310fd583c59636369aec5adba1..326cef8440f60923c9a5c2980e4d4ec8fecc56ce 100644 (file)
@@ -13,7 +13,12 @@ if test -z "$PYTHON"; then
        AC_MSG_WARN([No python found])
 fi
 
        AC_MSG_WARN([No python found])
 fi
 
-AC_PATH_PROG([PYTHON_CONFIG],[python[$PYTHON_VERSION]-config])
+if test -z "$PYTHON_VERSION"; then 
+       AC_PATH_PROGS([PYTHON_CONFIG], [python2.6-config python2.5-config python2.4-config python-config])
+else 
+       AC_PATH_PROG([PYTHON_CONFIG], [python[$PYTHON_VERSION]-config])
+fi
+
 if test -z "$PYTHON_CONFIG"; then
        working_python=no
        AC_MSG_WARN([No python-config found])
 if test -z "$PYTHON_CONFIG"; then
        working_python=no
        AC_MSG_WARN([No python-config found])