diff --git a/libwnck/Makefile.am b/libwnck/Makefile.am
index 9b6e8a8..1d3c0d8 100644
--- a/libwnck/Makefile.am
+++ b/libwnck/Makefile.am
@@ -129,13 +129,13 @@ wnck-enum-types.c: $(wnck_headers) wnck-enum-types.h
 	$(AM_V_GEN)glib-mkenums \
 		--fhead "#include <libwnck/libwnck.h>\n" \
 		--fprod "\n/* enumerations from \"@filename@\" */" \
-		--vhead "static const GEnumValue _@enum_name@_values[] = {" \
+		--vhead "static const G@Type@Value _@enum_name@_values[] = {" \
 		--vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
 		--vtail "  { 0, NULL, NULL }\n};\n\n" \
 		--vtail "GType\n@enum_name@_get_type (void)\n{\n" \
 		--vtail "  static GType type = 0;\n\n" \
 		--vtail "  if (!type)\n" \
-		--vtail "    type = g_enum_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
+		--vtail "    type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \
 		--vtail "  return type;\n}\n\n" \
 		$(wnck_headers) > $@
 
