echo "Preparing $distribution distribution version $version"
+#
# Go though the subdirs and create the Makefile.ams from the
-# Makefile.am.pre files.
-
+# Makefile.am.pre files. Create also the acconfig.h for the distribution.
+#
subdirs=`grep _"$distribution"_SUBDIRS= distributions |cut -d= -f2`
sed -e "/SILC_DISTRIBUTION_SUBDIRS/s//$subdirs/" Makefile.am.pre >Makefile.am
path=`pwd`
done
cd $path
-# Replace version string and create configure.in
+distlabel=`grep _"$distribution"_DISTLABEL= distributions |cut -d= -f2`
+cp acconfig.h.pre acconfig.h
+echo "#undef $distlabel" >>acconfig.h
+
+
+#
+# Replace version string, package name and distribution infos, and create
+# the actual configure.in
+#
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
+sed -e "/SILC_PACKAGE/s//silc-"$distribution"/" configure.in2 >configure.in3
+sed -e "/SILC_DIST_DEFINE/s//$distlabel/" configure.in3 >configure.in4
+sed -e "/SILC_DIST_DEFINE/s//$distlabel/" configure.in4 >configure.in
+rm -f configure.in2 configure.in3 configure.in4
+
#
# Prepare the Makefile.defines
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
+echo "#define SILC_NAME \"SILC $distribution\"" >>$file
+
# preparing irssi
cd irssi