Attempt to fix the merged build on OpenSuSE 10.2
[ira/wip.git] / m4 / check_python.m4
index 7e56af76f73d9cf1c58c8c5ee92a2989cac97e56..42eef19bd563d79ae99fcc1a6410b256f7c3e321 100644 (file)
@@ -17,6 +17,7 @@ AC_DEFUN([TRY_LINK_PYTHON],
                CFLAGS="$CFLAGS $2"
 
                AC_TRY_LINK([
+                                #undef HAVE_UINTPTR_T
                                /* we have our own configure tests */
                                #include <Python.h>
                        ],[
@@ -41,7 +42,11 @@ dnl $PYTHON_CFLAGS
 dnl $PYTHON_LDFLAGS
 AC_DEFUN([AC_SAMBA_PYTHON_DEVEL],
 [
-       AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
+       if test -z "$PYTHON_VERSION"; then
+               AC_PATH_PROGS([PYTHON], [python2.6 python2.5 python2.4 python])
+       else
+               AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
+       fi
        if test -z "$PYTHON"; then
                working_python=no
                AC_MSG_WARN([No python found])