File libidmef-1.0.2_cleanup_autoconf.diff of Package libidmef

--- libidmef-1.0.2/configure.in.bak	2009-08-11 15:37:15.000000000 +0200
+++ libidmef-1.0.2/configure.in	2009-08-11 16:00:02.000000000 +0200
@@ -116,22 +116,22 @@
 
 # Checks for libraries.
 
-#AM_PATH_XML2(2.5.10, [
-#libidmef_cflags="$XML_CFLAGS ${libidmef_cflags## }"
-#libidmef_libs="$XML_LIBS ${libidmef_libs## }"
-#CFLAGS="$XML_CFLAGS ${CFLAGS## }"
-#CPPFLAGS="$XML_CFLAGS ${CFLAGS## }"
-#LDFLAGS="$XML_LIBS ${LDFLAGS## }"
-#])
-
-PKG_CHECK_MODULES(XML2, libxml-2.0 >= 2.5.10,
-[libidmef_cflags="$XML2_CFLAGS ${libidmef_cflags## }"
-libidmef_libs="$XML2_LIBS ${libidmef_libs## }"
-CFLAGS="$XML2_CFLAGS ${CFLAGS## }"
-CPPFLAGS="$XML2_CFLAGS ${CFLAGS## }"
-LDFLAGS="$XML2_LIBS ${LDFLAGS## }"
+AM_PATH_XML2(2.5.10, [
+libidmef_cflags="$XML_CFLAGS ${libidmef_cflags## }"
+libidmef_libs="$XML_LIBS ${libidmef_libs## }"
+CFLAGS="$XML_CFLAGS ${CFLAGS## }"
+CPPFLAGS="$XML_CFLAGS ${CFLAGS## }"
+LDFLAGS="$XML_LIBS ${LDFLAGS## }"
 ])
 
+#PKG_CHECK_MODULES(XML2, libxml2 >= 2.5.10,
+#[libidmef_cflags="$XML2_CFLAGS ${libidmef_cflags## }"
+#libidmef_libs="$XML2_LIBS ${libidmef_libs## }"
+#CFLAGS="$XML2_CFLAGS ${CFLAGS## }"
+#CPPFLAGS="$XML2_CFLAGS ${CFLAGS## }"
+#LDFLAGS="$XML2_LIBS ${LDFLAGS## }"
+#])
+
 
 AC_SUBST(CFLAGS)
 AC_SUBST(CPPFLAGS)
--- libidmef-1.0.2/include/Makefile.am.bak	2009-08-11 16:21:46.000000000 +0200
+++ libidmef-1.0.2/include/Makefile.am	2009-08-11 16:57:00.000000000 +0200
@@ -23,18 +23,4 @@
 	@$(SED) -e "s|@inst_dtd_dir@|$(datadir)|" $< > $@
 
 idmef_create.h: idmef_create.h.in ../libidmef-functions.map
-	@list="`$(CAT) ../libidmef-functions.map | $(SED) -e \"s|#.*||\"`"; \
-	set -- $$list; \
-	while test -n "$$1"; do \
-		_func="$$1"; shift; \
-		_element="$$1"; shift; \
-		_type="$$1"; shift; \
-		case "$${_type}" in \
-		DOC|NODE) \
-		$(ECHO) "IDMEFPtr $${_func}(IDMEFPtr first, ...);"; ;; \
-		CONTENT|ATTRIBUTE) \
-		$(ECHO) "IDMEFPtr $${_func}(const char *first, ...);"; ;; \
-		esac; \
-	done | \
-	$(AWK) "/@input@/ {while(getline <\"/dev/stdin\") print \$$0} {print}" \
-		$< > $@;
+	perl ./gen.pl
--- libidmef-1.0.2/include/gen.pl.bak	1970-01-01 01:00:00.000000000 +0100
+++ libidmef-1.0.2/include/gen.pl	2009-08-11 17:22:31.000000000 +0200
@@ -0,0 +1,44 @@
+#!/usr/bin/perl
+
+open FIN , "< idmef_create.h.in" || exit 1;
+open FOUT, "> idmef_create.h"    || exit 1;
+
+while(<FIN>)
+{
+	unless(/\@input\@/)
+	{
+		print FOUT;
+		next;
+	}
+
+	open FD, "< ../libidmef-functions.map" || exit 1;
+	while(<FD>)
+	{
+		next if /^#/;
+
+		if(/([\d\w_-]+)\s+([\d\w_-]+)\s+([\d\w_-]+)/)
+		{
+			$func = $1;
+			$elem = $2;
+			$type = $3;
+		}
+		else
+		{
+			next
+		}
+
+		if($type =~ /DOC/ || $type =~ /NODE/)
+		{
+			print FOUT "IDMEFPtr $func(IDMEFPtr first, ...);\n"
+		}
+		elsif($type =~ /CONTENT/ || $type =~ /ATTRIBUTE/)
+		{
+			print FOUT "IDMEFPtr $func(const char *first, ...);\n"
+		}
+	}
+	close FD;
+}
+close FIN;
+close FOUT;
+
+0;
--- libidmef-1.0.2/configure.in.bak	2009-08-12 13:07:52.000000000 +0200
+++ libidmef-1.0.2/configure.in	2009-08-12 13:08:21.000000000 +0200
@@ -35,7 +35,7 @@
 LIBIDMEF_MAJOR_VERSION=1
 LIBIDMEF_MINOR_VERSION=0
 LIBIDMEF_MICRO_VERSION=2
-LIBIDMEF_TAG_VERSION=beta2
+LIBIDMEF_TAG_VERSION=
 LIBIDMEF_VERSION=$LIBIDMEF_MAJOR_VERSION.$LIBIDMEF_MINOR_VERSION.$LIBIDMEF_MICRO_VERSION
 LIBIDMEF_VERSION_INFO=`expr $LIBIDMEF_MAJOR_VERSION + $LIBIDMEF_MINOR_VERSION`:$LIBIDMEF_MICRO_VERSION:$LIBIDMEF_MINOR_VERSION
 LIBIDMEF_VERSION_NUMBER=`expr $LIBIDMEF_MAJOR_VERSION \* 10000 + $LIBIDMEF_MINOR_VERSION \* 100 + $LIBIDMEF_MICRO_VERSION`