-#!/bin/sh
+#! /bin/sh
#
# prepare
#
#
# If <package version> is omitted <base version> is used as package
# version. The package version appears in the package name and in those
-# distributions that used the SILC_DISTRIBUTION_VERSION define in the
+# distributions that used the SILC_DIST_VERSION_STRING define in the
# code. The base version is the SILC_VERSION_STRING define.
#
cd $path
# Replace version string and create configure.in
-sed -e "/SILC_VERSION/s//$version/" configure.in.pre >configure.in2
+echo "# Automatically generated by ./prepare from configure.in.pre. Do not edit!" >configure.in2
+sed -e "/SILC_VERSION/s//$dist_version/" configure.in.pre >>configure.in2
sed -e "/SILC_PACKAGE/s//silc-"$distribution"/" configure.in2 >configure.in
rm -f configure.in2
+#
+# Prepare the Makefile.defines
+#
+cp Makefile.defines.pre Makefile.defines.in
+cp Makefile.defines.in irssi
+cp Makefile.defines_int.pre Makefile.defines_int.in
+cp Makefile.defines_int.in irssi
+
aclocal
autoconf
autoheader
file=includes/version_internal.h
echo "/* Automatically generated by ./prepare */" >$file
echo "#define SILC_VERSION_STRING \"$version\"" >>$file
+echo "#define SILC_DIST_VERSION_STRING \"$dist_version\"" >>$file
echo "#define SILC_PROTOCOL_VERSION_STRING \"SILC-1.0-$version\"" >>$file
# preparing irssi
file=irssi/irssi-version.h.in
version_date=`date +%Y%m%d`
echo "/* automatically created by autogen.sh */" > $file
-echo "#define IRSSI_VERSION \"$version (Irssi base: @VERSION@ - SILC base: SILC Toolkit $version)\"" >> $file
+echo "#define IRSSI_VERSION \"$dist_version (Irssi base: @VERSION@ - SILC base: SILC Toolkit $version)\"" >>$file
echo "#define IRSSI_VERSION_DATE \"$version_date\"" >> $file
echo "Done, now run ./configure and make."