Index: configure.in
===================================================================
--- configure.in	(revision 5399)
+++ configure.in	(working copy)
@@ -24,7 +24,10 @@
 
 AC_PROG_CXX
 AM_PROG_CC_C_O
-AC_PROG_LIBTOOL()
+
+AC_PROG_LIBTOOL
+m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
+
 PKG_PROG_PKG_CONFIG
 
 AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal])
@@ -266,23 +269,14 @@
 	[enable_python=autodetect have_python=yes])
 AC_MSG_RESULT([$enable_python])
 
-if test "x$have_python" != "xyes"; then
-	if test "x$enable_python" = "xyes"; then
-		AC_MSG_ERROR([Python not found])
-	elif test "x$enable_python" = "xautodetect"; then
-		enable_python=no
-		AC_MSG_WARN([Python not found, disabling python support])
-	fi
-fi
-
-if test "x$have_python" != "xno"; then
+if test "x$enable_python" != "xno"; then
 	AM_PATH_PYTHON([2.3],[],[have_python=no])
 	if test "x$PYTHON" = "x:"; then
 		have_python=no
 	fi
 fi
 
-if test "x$have_python" != "xno"; then
+if test "x$enable_python" != "xno"; then
 	PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
 	PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'`
 	PYTHON_LIBS="-lpython$PYTHON_VERSION"
@@ -329,6 +323,15 @@
 	AC_MSG_RESULT([$result])
 fi
 
+if test "x$have_python" != "xyes"; then
+	if test "x$enable_python" = "xyes"; then
+		AC_MSG_ERROR([Python not found])
+	elif test "x$enable_python" = "xautodetect"; then
+		enable_python=no
+		AC_MSG_WARN([Python not found, disabling python support])
+	fi
+fi
+
 if test "x$have_python" != "xno"; then
 	PYGTK_REQUIRED=2.12.0
 
