mod_netconf: added $Id string
diff --git a/src/Makefile.in b/src/Makefile.in
index a385ec2..208c61a 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -6,6 +6,8 @@
 RPMDIR = RPMBUILD
 RPMBUILD = @RPMBUILD@
 
+IDGIT = "built from git $(shell git show --pretty=oneline | head -1 | cut -c -20)"
+IDNOGIT = "released as version $(VERSION)"
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 datarootdir = @datarootdir@
@@ -16,6 +18,9 @@
 mandir = @mandir@
 sysconfdir = @sysconfdir@
 
+ARCSID = @ARCSID@
+RCSID = @RCSID@
+
 APXS=/usr/sbin/apxs
 
 CFLAGS=-I/usr/include/json
@@ -27,10 +32,10 @@
 all: module client
 
 module: mod_netconf.c
-	$(APXS) $(CPPFLAGS) $(CFLAGS) $(LIBS) -c mod_netconf.c
+	$(APXS) $(LIBS) $(ARCSID) -c mod_netconf.c
 
 client: test-client.c
-	gcc -std=gnu99 -Wall -g -ljson -I/usr/include/json test-client.c -o test-client
+	gcc $(RCSID) -std=gnu99 -Wall -g -ljson -I/usr/include/json test-client.c -o test-client
 
 #install: $(NAME).la
 #	$(APXS) -i $(NAME).la
diff --git a/src/configure b/src/configure
index 16af7ee..321ffb3 100755
--- a/src/configure
+++ b/src/configure
@@ -637,6 +637,8 @@
 
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
+ARCSID
+RCSID
 BUILDREQS
 REQS
 EGREP
@@ -1949,6 +1951,17 @@
 RELEASE=1
 
 
+if test "`git show > /dev/null 2>&1;echo $?`" = "0"; then
+	RCSID="-DRCSID=\\\"\$(IDGIT)\\\""
+
+	ARCSID="-DARCSID='\\\"\$(IDGIT)\\\"'"
+        #CFLAGS="$CPPFLAGS -DARCSID='\\\"\$(IDGIT)\\\"' -DRCSID=\\\"\$(IDGIT)\\\""
+else
+	RCSID="-DRCSID=\\\"\$(IDNOGIT)\\\""
+	ARCSID="-DARCSID=\\\"\$(IDNOGIT)\\\""
+        #CFLAGS="$CPPFLAGS -DRCSID='\\\"\$(IDNOGIT)\\\"' -DRCSID=\\\"\$(IDNOGIT)\\\""
+fi
+
 REQS="$REQS httpd php json-c"
 BUILDREQS="$BUILDREQS json-c-devel httpd-devel"
 
@@ -3754,6 +3767,9 @@
 
 
 
+
+
+
 ac_config_files="$ac_config_files Makefile"
 
 ac_config_files="$ac_config_files mod_netconf.spec"
diff --git a/src/configure.in b/src/configure.in
index 06eb53d..2d122af 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -15,6 +15,14 @@
 RELEASE=1
 AC_SUBST(RELEASE)
 
+if test "`git show > /dev/null 2>&1;echo $?`" = "0"; then
+	RCSID="-DRCSID=\\\"\$(IDGIT)\\\""
+	ARCSID="-DARCSID='\\\"\$(IDGIT)\\\"'"
+else
+	RCSID="-DRCSID=\\\"\$(IDNOGIT)\\\""
+	ARCSID="-DARCSID='\\\"\$(IDNOGIT)\\\"'"
+fi
+
 REQS="$REQS httpd php json-c"
 BUILDREQS="$BUILDREQS json-c-devel httpd-devel"
 
@@ -37,6 +45,9 @@
 
 AC_SUBST(REQS)
 AC_SUBST(BUILDREQS)
+AC_SUBST(CPPFLAGS)
+AC_SUBST(RCSID)
+AC_SUBST(ARCSID)
 
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_FILES([mod_netconf.spec])
diff --git a/src/mod_netconf.c b/src/mod_netconf.c
index 97ee5dc..0710f55 100644
--- a/src/mod_netconf.c
+++ b/src/mod_netconf.c
@@ -43,6 +43,7 @@
  * if advised of the possibility of such damage.
  *
  */
+static const char rcsid[] __attribute__((used)) ="$Id: "__FILE__": "ARCSID" $";
 
 #include <unistd.h>
 #include <poll.h>
diff --git a/src/test-client.c b/src/test-client.c
index 42c5549..f09ef6d 100644
--- a/src/test-client.c
+++ b/src/test-client.c
@@ -57,6 +57,8 @@
 #include <ctype.h>
 #include "message_type.h"
 
+static const char rcsid[] __attribute__((used)) ="$Id: "__FILE__": "RCSID" $";
+
 #define SOCKET_FILENAME "/tmp/mod_netconf.sock"
 #define BUFFER_SIZE 40960