diff mbox

[04/10] configure: move test_perf to its own m4 file

Message ID 1458758254-4703-5-git-send-email-anders.roxell@linaro.org
State Superseded
Headers show

Commit Message

Anders Roxell March 23, 2016, 6:37 p.m. UTC
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 configure.ac           | 19 ++++++-------------
 test/m4/configure.m4   |  2 ++
 test/m4/performance.m4 |  9 +++++++++
 3 files changed, 17 insertions(+), 13 deletions(-)
 create mode 100644 test/m4/performance.m4
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 6d6e17a..cf64c52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,6 +82,11 @@  AC_SUBST([platform_with_platform], ["platform/${with_platform}"])
 AC_SUBST([platform_with_platform_test], ["platform/${with_platform}/test"])
 
 ##########################################################################
+# Include m4 files
+##########################################################################
+m4_include([./test/m4/configure.m4])
+
+##########################################################################
 # Run platform specific checks and settings
 ##########################################################################
 if test "${with_platform}" == "linux-generic";
@@ -133,6 +138,7 @@  AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ])
 AM_CONDITIONAL([HAVE_PCAP], [test $have_pcap = yes])
 AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"])
 AM_CONDITIONAL([test_installdir], [test "$testdir" != ""])
+AM_CONDITIONAL([test_perf], [test x$test_perf = xyes ])
 
 ##########################################################################
 # Setup doxygen documentation
@@ -155,18 +161,6 @@  AC_ARG_ENABLE([test_vald],
 AM_CONDITIONAL([test_vald], [test x$test_vald = xyes ])
 
 ##########################################################################
-# Enable/disable test-perf
-##########################################################################
-test_perf=no
-AC_ARG_ENABLE([test-perf],
-    [  --enable-test-perf      run test in test/performance],
-    [if test "x$enableval" = "xyes"; then
-        test_perf=yes
-    fi])
-
-AM_CONDITIONAL([test_perf], [test x$test_perf = xyes ])
-
-##########################################################################
 # Enable/disable test-helper
 ##########################################################################
 test_helper=yes
@@ -325,7 +319,6 @@  AC_CONFIG_FILES([Makefile
 
 m4_include([./doc/m4/configure.m4])
 m4_include([./example/m4/configure.m4])
-m4_include([./test/m4/configure.m4])
 
 AC_SEARCH_LIBS([timer_create],[rt posix4])
 
diff --git a/test/m4/configure.m4 b/test/m4/configure.m4
index 7868e10..e4b7d7a 100644
--- a/test/m4/configure.m4
+++ b/test/m4/configure.m4
@@ -1,3 +1,5 @@ 
+m4_include([test/m4/performance.m4])
+
 AC_CONFIG_FILES([test/Makefile
 		 test/miscellaneous/Makefile
 		 test/performance/Makefile
diff --git a/test/m4/performance.m4 b/test/m4/performance.m4
new file mode 100644
index 0000000..1e2000d
--- /dev/null
+++ b/test/m4/performance.m4
@@ -0,0 +1,9 @@ 
+##########################################################################
+# Enable/disable test-perf
+##########################################################################
+test_perf=no
+AC_ARG_ENABLE([test-perf],
+    [  --enable-test-perf      run test in test/performance],
+    [if test "x$enableval" = "xyes"; then
+        test_perf=yes
+    fi])