updates
[silc.git] / prepare
diff --git a/prepare b/prepare
index 3a0829de505fba91c8bc78901281e8d8518ee371..cc6f6d77da33ffe1ba7ff45c6d659458088a8f69 100755 (executable)
--- a/prepare
+++ b/prepare
@@ -62,9 +62,10 @@ fi
 
 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`
@@ -83,11 +84,22 @@ do
 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
@@ -114,6 +126,8 @@ 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
+echo "#define SILC_NAME \"SILC $distribution\"" >>$file
+
 
 # preparing irssi
 cd irssi