From 3c75e1391d9ea2aa599daa89b52e815ff9e8a39d Mon Sep 17 00:00:00 2001 From: tchernobog Date: Thu, 9 Mar 2006 21:02:43 +0000 Subject: [PATCH] - Add support for conditional compilation of tests git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@518 3ecf2c5c-341e-0410-92b4-d18e462d057c --- Makefile.am | 4 ++++ configure.ac | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index a19f87a..5a94c10 100644 --- a/Makefile.am +++ b/Makefile.am @@ -322,6 +322,8 @@ policies_PYTHON = \ # # ############################################################ +if COND_TESTS + # DEJATOOL = src/testsuite/example-test.exp noinst_PROGRAMS = \ @@ -395,3 +397,5 @@ noinst_PYTHON += src/testsuite/python_loader_configure.py \ CLEANFILES += \ src/testsuite/.libs/test-python_loader \ src/testsuite/.libs/test-history + +endif #~ if COND_TESTS diff --git a/configure.ac b/configure.ac index a6dea25..023b818 100644 --- a/configure.ac +++ b/configure.ac @@ -131,14 +131,23 @@ AC_COMPILE_IFELSE( ]) AC_LANG_POP - dnl check for Doxygen AC_CHECK_PROG([HAVE_DOXYGEN],[doxygen],[yes]) AC_CHECK_PROG([HAVE_DOT],[dot], [yes]) AM_CONDITIONAL([HAVE_DOXYGEN],[test x$HAVE_DOXYGEN = xyes]) -AC_CONFIG_FILES([config/Doxyfile]) +dnl see if we've to compile tests +AC_MSG_CHECKING([whether tests have to be built]) +AC_ARG_ENABLE([tests], + AS_HELP_STRING([--disable-tests], + [don't compile the tests provided with sgpemv2]), + [compile_tests="$enableval"], + [compile_tests="yes"]) +AC_MSG_RESULT([$compile_tests]) +AM_CONDITIONAL([COND_TESTS], [test "$compile_tests" = "yes"]) +dnl output files +AC_CONFIG_FILES([config/Doxyfile]) AC_CONFIG_HEADERS([config.h:config.h.in]) AC_CONFIG_FILES([