summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.in9
-rw-r--r--irssi-version.h3
-rw-r--r--irssi-version.h.in4
4 files changed, 14 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index d356aacc..8a788d3e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,7 @@ conf_DATA = irssi.conf
themedir = $(datadir)/irssi/themes
theme_DATA = default.theme colorless.theme
-noinst_HEADERS = irssi-version.h
+noinst_HEADERS = irssi-version.h.in
EXTRA_DIST = \
ChangeLog \
diff --git a/configure.in b/configure.in
index 23596412..3dac15ea 100644
--- a/configure.in
+++ b/configure.in
@@ -755,6 +755,14 @@ if test "x$want_ipv6" = "xyes"; then
AC_MSG_RESULT($irssi_cv_type_in6_addr)
fi
+dnl **
+dnl ** IRSSI_VERSION_DATE and IRSSI_VERSION_TIME
+dnl **
+VERSION_DATE=`head -1 $srcdir/ChangeLog|sed 's/^\(....\)-\(..\)-\(..\).*/\1\2\3/'`
+VERSION_TIME=`head -1 $srcdir/ChangeLog|sed 's/^[[^ ]]* \(..\):\(..\).*/\1\2/'`
+AC_SUBST(VERSION_DATE)
+AC_SUBST(VERSION_TIME)
+
AC_OUTPUT(
Makefile
src/Makefile
@@ -785,6 +793,7 @@ scripts/Makefile
docs/Makefile
docs/help/Makefile
docs/help/in/Makefile
+irssi-version.h
stamp.h
irssi.spec
irssi-config)
diff --git a/irssi-version.h b/irssi-version.h
deleted file mode 100644
index 6149a637..00000000
--- a/irssi-version.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* This file is updated daily in CVS - not generated by configure */
-#define IRSSI_VERSION "0.7.98.CVS"
-#define IRSSI_VERSION_DATE 20011215
diff --git a/irssi-version.h.in b/irssi-version.h.in
new file mode 100644
index 00000000..349d8c92
--- /dev/null
+++ b/irssi-version.h.in
@@ -0,0 +1,4 @@
+/* automatically created by configure */
+#define IRSSI_VERSION "@VERSION@"
+#define IRSSI_VERSION_DATE @VERSION_DATE@
+#define IRSSI_VERSION_TIME @VERSION_TIME@