Honor enable/disable-tests configure flag (neethi)
JIRA: AXIS2C-1690
diff --git a/neethi/Makefile.am b/neethi/Makefile.am
index 7036058..550b282 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 test
+SUBDIRS = src $(TESTDIR)
includedir=$(prefix)/include/axis2-${PACKAGE_VERSION}
include_HEADERS=$(top_builddir)/include/*.h
diff --git a/neethi/configure.ac b/neethi/configure.ac
index 745d5d2..0a47885 100644
--- a/neethi/configure.ac
+++ b/neethi/configure.ac
@@ -130,6 +130,26 @@
)
+AC_MSG_CHECKING(whether to build tests)
+AC_ARG_ENABLE(tests, [ --enable-tests build tests. default=no],
+[ case "${enableval}" in
+ yes)
+ AC_MSG_RESULT(yes)
+ TESTDIR="test"
+ ;;
+ *)
+ AC_MSG_RESULT(no)
+ TESTDIR=""
+
+ ;;
+ esac ],
+ AC_MSG_RESULT(no)
+ TESTDIR=""
+)
+
+
+
+
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdio.h stdlib.h string.h])
@@ -152,6 +172,7 @@
AC_SUBST(VERSION_NO)
AC_SUBST(WRAPPER_DIR)
+AC_SUBST(TESTDIR)
export WRAPPER_DIR