File libqb-configure-package-version.patch of Package libqb

diff --git a/configure.ac b/configure.ac
index a4dc7c0..e0a5c92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,19 @@ AC_CANONICAL_HOST
 AC_PROG_LIBTOOL
 AC_LANG([C])
 
+
+if test $PACKAGE_VERSION = "UNKNOWN"; then
+    # The current directory name make a reasonable default
+    # Most generated archives will include the hash or tag
+    BASE=`basename $PWD`
+    PACKAGE_VERSION=`echo $BASE | sed s:.*[[Ll]]ibqb-::`
+    AC_MSG_RESULT(directory based hash: $PACKAGE_VERSION)
+
+    AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION)
+    AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$PACKAGE_VERSION", Current libqb version)
+    AC_SUBST(PACKAGE_VERSION)
+fi
+
 dnl Fix default variables - "prefix" variable if not specified
 if test "$prefix" = "NONE"; then
 	prefix="/usr"