Add gtest support to neethi build
diff --git a/neethi/Makefile.am b/neethi/Makefile.am
index 550b282..93b3c1a 100644
--- a/neethi/Makefile.am
+++ b/neethi/Makefile.am
@@ -12,6 +12,6 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-SUBDIRS = src $(TESTDIR)
+SUBDIRS = src $(GTEST) $(TESTDIR)
 includedir=$(prefix)/include/axis2-${PACKAGE_VERSION}
 include_HEADERS=$(top_builddir)/include/*.h
diff --git a/neethi/configure.ac b/neethi/configure.ac
index 0a47885..a9e9a2e 100644
--- a/neethi/configure.ac
+++ b/neethi/configure.ac
@@ -27,6 +27,7 @@
 dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_CPP
+AC_PROG_CXX
 AC_PROG_LIBTOOL
 AC_PROG_INSTALL
 AC_PROG_LN_S
@@ -129,6 +130,25 @@
   CPPFLAGS="$CPPFLAGS"]
 )
 
+AC_MSG_CHECKING(whether to use the Google test framework)
+AC_ARG_WITH(gtest,
+            [  --with-gtest[=PATH]      Find the gtest source files in 'PATH'.],
+[ case "$withval" in
+  no)
+    AC_MSG_RESULT(no)
+    USE_GTEST=""
+    GTEST_DIR=""
+    GTEST=""
+    ;;
+  *)
+    AC_MSG_RESULT(yes)
+    GTEST_DIR="$withval"
+    GTEST="gtest"
+    CXXFLAGS="$CXXFLAGS -g -Wall -Wextra -pthread"
+    ;;
+  esac ],
+  AC_MSG_RESULT(no)
+)
 
 AC_MSG_CHECKING(whether to build tests)
 AC_ARG_ENABLE(tests, [  --enable-tests    build tests. default=no],
@@ -172,6 +192,8 @@
 
 AC_SUBST(VERSION_NO)
 AC_SUBST(WRAPPER_DIR)
+AC_SUBST(GTEST_DIR)
+AC_SUBST(GTEST)
 AC_SUBST(TESTDIR)
 
 export WRAPPER_DIR
@@ -182,7 +204,8 @@
     src/secpolicy/model/Makefile \
     src/secpolicy/builder/Makefile \
     src/rmpolicy/Makefile \
+    gtest/Makefile \
     test/Makefile
     ])
-    
+
 AC_OUTPUT