diff --git a/configure.in b/configure.in
index cc1dd817c316475f328864b25f65d4cf9a05abac..57bcea0342920e4fb926bdb86b305cc59ccc5d69 100644
--- a/configure.in
+++ b/configure.in
@@ -7,8 +7,10 @@ AC_CONFIG_SRCDIR([src])
 # real config header ourselves.
 AC_CONFIG_HEADERS([dummy-config.h dsieve-config.h])
 
-AC_DEFINE(SIEVE_NAME, AC_PACKAGE_NAME, [Define to the full name of this Sieve implementation.])
-AC_DEFINE(SIEVE_VERSION, AC_PACKAGE_VERSION, [Define to the version of this Sieve implementation.])
+AC_DEFINE_UNQUOTED(SIEVE_NAME, "$PACKAGE_NAME", 
+	[Define to the full name of this Sieve implementation.])
+AC_DEFINE_UNQUOTED(SIEVE_VERSION, "$PACKAGE_VERSION", 
+	[Define to the version of this Sieve implementation.])
 
 AM_INIT_AUTOMAKE(no-define)