__SILC_ENABLE_DEBUG=""
#ifdef SILC_DIST_TOOLKIT
-toolkitver=`echo $VERSION | sed 's/\./_/g'`
-__SILC_PACKAGE_VERSION="#define __SILC_TOOLKIT_$toolkitver 1"
+toolkitver=`echo $VERSION | sed 's/\./ /g'`
+maj=0
+min=0
+bld=0
+for v in $toolkitver
+do
+ if test $maj -eq 0; then
+ maj=$v
+ continue
+ fi
+ if test $min -eq 0; then
+ min=$v
+ continue
+ fi
+ if test $bld -eq 0; then
+ bld=$v
+ continue
+ fi
+done
+__SILC_PACKAGE_VERSION="#define __SILC_TOOLKIT_VERSION SILC_VERSION($maj,$min,$bld)"
#endif SILC_DIST_TOOLKIT
AC_PROG_RANLIB
@__SILC_HAVE_PTHREAD@
@__SILC_HAVE_SIM@
@__SILC_ENABLE_DEBUG@
-@__SILC_PACKAGE_VERSION@
#if defined(HAVE_SILCDEFS_H)
/* Automatically generated configuration header */
extern "C" {
#endif
+/* Version check macro. Use this to check that package is of specific
+ version compile time. Use the __SILC_XXX_VERSION below in comparison. */
+#define SILC_VERSION(a, b, c) (((a) << 24) + ((b) << 16) + ((c) << 8)
+@__SILC_PACKAGE_VERSION@
+
#define SILC_VERSION_STRING "@VERSION@"
#define SILC_DIST_VERSION_STRING "@VERSION@"
#define SILC_PROTOCOL_VERSION_STRING "SILC-1.2-@VERSION@ @PACKAGE@"