tools_wifi_scan_LDADD = @GLIB_LIBS@ @NETLINK_LIBS@
endif
-EXTRA_DIST += test/get-state test/list-profiles test/list-services \
+test_scripts = test/get-state test/list-profiles test/list-services \
test/connect-service test/list-connections \
test/select-connection test/list-devices test/enable-device \
test/disable-device test/start-scanning test/list-networks \
test/test-manager test/test-connman test/monitor-connman \
test/monitor-services test/debug-connman
+if TEST
+testdir = $(pkglibdir)/test
+test_SCRIPTS = $(test_scripts)
+endif
+
+EXTRA_DIST += $(test_scripts)
+
EXTRA_DIST += doc/overview-api.txt doc/behavior-api.txt \
doc/ipconfig-api.txt doc/plugin-api.txt \
doc/manager-api.txt doc/agent-api.txt \
fi
AM_CONDITIONAL(TOOLS, test "${enable_tools}" = "yes")
+AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test],
+ [enable test/example scripts]), [enable_test=${enableval}])
+AM_CONDITIONAL(TEST, test "${enable_test}" = "yes")
+
AC_ARG_ENABLE(fake, AC_HELP_STRING([--enable-fake],
[enable fake device support]), [enable_fake=${enableval}])
AM_CONDITIONAL(FAKE, test "${enable_fake}" = "yes")