Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 460)
+++ CMakeLists.txt	(revision 561)
@@ -64,4 +64,7 @@
 # how to do the check with cmake???
 
+# Add this to workaround an apparent bug in FreeBSD cmake (already defined in Linux)
+SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-rdynamic")
+
 # Location for the include files
 INCLUDE_DIRECTORIES(include)
@@ -73,4 +76,4 @@
 SUBDIRS(freeDiameter)
 
-# Extensions (there is no point in freeDiameter without any extension)
+# Extensions (there is no use of freeDiameter without any extension)
 SUBDIRS(extensions)
Index: contrib/debian/control
===================================================================
--- contrib/debian/control	(revision 483)
+++ contrib/debian/control	(revision 561)
@@ -89,5 +89,5 @@
 Package: freediameter-radius-gateway
 Architecture: any
-Depends: ${misc:Depends}, freediameter-dictionary-rfc4072 (= ${binary:Version}), freediameter-dictionary-rfc4740 (= ${binary:Version})
+Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version}), freediameter-dictionary-rfc4072 (= ${binary:Version}), freediameter-dictionary-rfc4740 (= ${binary:Version})
 Description: RADIUS/Diameter extensible gateway.
  This freeDiameter extension implements a RADIUS to Diameter
@@ -119,4 +119,5 @@
 Architecture: any
 Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version}), libpq5
+Suggests: freediameter-dictionary-rfc4072
 Description: freeDiameter simple Accounting server.
  This freeDiameter extension implements the Diameter Base 
@@ -131,8 +132,11 @@
  This extension requires a configuration file.
  See app_acct.conf.sample for more details.
+ .
+ You may find some useful resources to parse the saved records
+ in the contrib/app_acct_tools folder in source package.
 
 Package: freediameter-eap-server
 Architecture: any
-Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version}), mysql-client, freediameter-dictionary-rfc4072 (= ${binary:Version})
+Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version}), libmysqlclient16, freediameter-dictionary-rfc4072 (= ${binary:Version})
 Description: freeDiameter Diameter EAP server implementation.
  This freeDiameter extension implements a Diameter EAP server. 
@@ -149,5 +153,5 @@
 Package: freediameter-sip-server
 Architecture: any
-Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version}), mysql-client, freediameter-dictionary-rfc4740 (= ${binary:Version})
+Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version}), libmysqlclient16, freediameter-dictionary-rfc4740 (= ${binary:Version})
 Description: freeDiameter Diameter SIP server implementation.
  This freeDiameter extension implements a Diameter SIP server.
Index: contrib/debian/freediameter-radius-gateway.install
===================================================================
--- contrib/debian/freediameter-radius-gateway.install	(revision 497)
+++ contrib/debian/freediameter-radius-gateway.install	(revision 561)
@@ -1,3 +1,2 @@
 usr/lib/freeDiameter/app_radgw.fdx
 usr/lib/freeDiameter/*.rgwx
-usr/lib/rgw_common.*
Index: extensions/app_radgw/CMakeLists.txt
===================================================================
--- extensions/app_radgw/CMakeLists.txt	(revision 551)
+++ extensions/app_radgw/CMakeLists.txt	(revision 561)
@@ -13,25 +13,4 @@
 
 
-########### Utility library #############
-# utility libray for the extension and its plugins
-# See rgw_common.h for detail
-
-SET( RG_COMMON_SRC
-	radius.c
-	md5.c
-	rgw_msg_codes.c
-	rgw_msg_attrtype.c
-)
-SET( RG_COMMON_HEADER
-	rgw_common.h
-	radius.h
-	md5.h
-	hostap_compat.h
-)
-ADD_LIBRARY(rgw_common SHARED ${RG_COMMON_SRC})
-SET_TARGET_PROPERTIES(rgw_common PROPERTIES PREFIX "" )
-
-
-
 ########### Main app_radgw extension #############
 
@@ -43,4 +22,8 @@
 # List of source files
 SET( RGW_DEFAULT_SRC
+	radius.c
+	md5.c
+	rgw_msg_codes.c
+	rgw_msg_attrtype.c
 	rgw_main.c
 	lex.rgw_conf.c
@@ -53,8 +36,13 @@
 )
 
+SET( RG_COMMON_HEADER
+	rgw_common.h
+	radius.h
+	md5.h
+	hostap_compat.h
+)
+
 # Compile these files as a freeDiameter extension.
 FD_ADD_EXTENSION(app_radgw ${RGW_DEFAULT_SRC} ${RG_COMMON_HEADER})
-TARGET_LINK_LIBRARIES(app_radgw rgw_common)
-
 
 
@@ -67,5 +55,4 @@
   SET_TARGET_PROPERTIES(${PLGNAME} PROPERTIES PREFIX "" )
   SET_TARGET_PROPERTIES(${PLGNAME} PROPERTIES SUFFIX ".rgwx" )
-  TARGET_LINK_LIBRARIES(${PLGNAME} rgw_common)
   INSTALL(TARGETS ${PLGNAME}
 	LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
@@ -126,7 +113,3 @@
 	COMPONENT freeDiameter-radius-gateway)
 	
-INSTALL(TARGETS rgw_common
-	LIBRARY DESTINATION ${INSTALL_LIBRARY_SUFFIX}
-	COMPONENT freeDiameter-radius-gateway)
-
 # Note that all compiled plugins are added by the RGWX_ADD_PLUGIN macro in the component freeDiameter-radius-gateway as well.
Index: freeDiameter/CMakeLists.txt
===================================================================
--- freeDiameter/CMakeLists.txt	(revision 493)
+++ freeDiameter/CMakeLists.txt	(revision 561)
@@ -68,7 +68,4 @@
 	VERSION ${FD_PROJECT_VERSION_MAJOR}.${FD_PROJECT_VERSION_MINOR}.${FD_PROJECT_VERSION_REV})
 
-# Add this to workaround an apparent bug in FreeBSD cmake (already defined in Linux)
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-rdynamic")
-
 # The link command
 LINK_DIRECTORIES(${CURRENT_BINARY_DIR}/../libfreeDiameter)
Index: include/freeDiameter/CMakeLists.txt
===================================================================
--- include/freeDiameter/CMakeLists.txt	(revision 493)
+++ include/freeDiameter/CMakeLists.txt	(revision 561)
@@ -113,4 +113,5 @@
 SET(FD_LIBS  ${FD_LIBS}  PARENT_SCOPE)
 SET(LFD_LIBS ${LFD_LIBS} PARENT_SCOPE)
+SET(CMAKE_THREAD_LIBS_INIT ${CMAKE_THREAD_LIBS_INIT} PARENT_SCOPE)
 
 ####
