--- /dev/null
+AC_INIT([newt_pr.h])
+
+PACKAGE=newt
+VERSION=$(awk '/^%define version/ {print $3}' $srcdir/newt.spec)
+SONAME=0.52
+
+AC_CONFIG_HEADER([config.h])
+
+AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Package Name])
+AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [NEWT Version String])
+AC_SUBST([VERSION])
+AC_SUBST([SONAME])
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_LN_S
+
+AC_CHECK_HEADERS([sys/select.h alloca.h])
+
+AC_MSG_CHECKING([for python versions])
+PYTHONVERS=$(echo /usr/include/python*/Python.h | sed "s|/usr/include/||g"| sed "s|/Python.h||g" 2> /dev/null)
+AC_MSG_RESULT([$PYTHONVERS])
+AC_SUBST([PYTHONVERS])
+
+AC_ARG_WITH([tcl], [ --without-tcl do not compile whiptcl.so])
+if test "x$with_tcl" = "xno"; then
+ WHIPTCLSO=
+else
+ AC_CHECK_HEADER([tcl.h], [WHIPTCLSO=whiptcl.so], [WHIPTCLSO=])
+fi
+AC_SUBST([WHIPTCLSO])
+
+AC_ARG_WITH([gpm-support], [ --with-gpm-support compile with GPM support])
+
+if test "x$with_gpm_support" = "xyes"; then
+ AC_DEFINE([USE_GPM], 1, [Define to 1 if GPM support is enabled])
+fi
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+
+++ /dev/null
-dnl Process this file with autoconf to produce a configure script.
-
-AC_INIT(newt_pr.h)
-AC_CONFIG_HEADER(config.h)
-
-PACKAGE=newt
-VERSION=0.52.1
-SONAME=0.52
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [NEWT Version String])
-AC_SUBST(PACKAGE)
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Package Name])
-AC_SUBST(VERSION)
-AC_DEFINE_UNQUOTED(SONAME, "$SONAME", [NEWT Library Version (SONAME)])
-AC_SUBST(SONAME)
-AC_PROG_CC
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AM_GNU_GETTEXT([external])
-
-AC_CHECK_HEADERS(sys/select.h alloca.h)
-
-AC_ARG_WITH(gpm-support, [ --with-gpm-support Compile with GPM support])
-
-if test "x$with_gpm_support" = "xyes"; then
- AC_DEFINE(USE_GPM, 1, [Define to 1 if GPM support is enabled])
-fi
-
-AC_OUTPUT([Makefile po/Makefile.in])
-