]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
- move configure.in to configure.ac
authormlichvar <mlichvar>
Tue, 19 Sep 2006 12:35:40 +0000 (12:35 +0000)
committermlichvar <mlichvar>
Tue, 19 Sep 2006 12:35:40 +0000 (12:35 +0000)
- take version from spec again
- check for installed python versions
- check for tcl.h and add --without-tcl option

configure.ac [new file with mode: 0644]
configure.in [deleted file]

diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..9cbc579
--- /dev/null
@@ -0,0 +1,40 @@
+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
+
diff --git a/configure.in b/configure.in
deleted file mode 100644 (file)
index 3b01e29..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-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])
-