tools: Hide new commands behind experimental flag

Hide the commands behind a flag so we can continue doing releases while
the commands aren't ready.
diff --git a/Makefile.am b/Makefile.am
index b991936..5614317 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -127,9 +127,14 @@
 	tools/rmmod.c tools/insmod.c \
 	tools/modinfo.c tools/modprobe.c \
 	tools/depmod.c tools/log.h tools/log.c \
-	tools/insert.c \
-	tools/remove.c \
 	tools/static-nodes.c
+
+if BUILD_EXPERIMENTAL
+tools_kmod_SOURCES += \
+	tools/insert.c \
+	tools/remove.c
+endif
+
 tools_kmod_LDADD = \
 	shared/libshared.la \
 	libkmod/libkmod-internal.la
@@ -323,8 +328,12 @@
 	testsuite/test-modinfo testsuite/test-util testsuite/test-new-module \
 	testsuite/test-modprobe testsuite/test-blacklist \
 	testsuite/test-dependencies testsuite/test-depmod \
-	testsuite/test-list \
+	testsuite/test-list
+
+if BUILD_EXPERIMENTAL
+TESTSUITE += \
 	testsuite/test-tools
+endif
 
 check_PROGRAMS = $(TESTSUITE)
 TESTS = $(TESTSUITE)
@@ -364,8 +373,11 @@
 testsuite_test_depmod_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
 testsuite_test_list_LDADD = $(TESTSUITE_LDADD)
 testsuite_test_list_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
+
+if BUILD_EXPERIMENTAL
 testsuite_test_tools_LDADD = $(TESTSUITE_LDADD)
 testsuite_test_tools_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
+endif
 
 testsuite-distclean:
 	$(RM) -r $(ROOTFS)
diff --git a/configure.ac b/configure.ac
index 6e67584..f83eed5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -117,6 +117,14 @@
 # --enable-
 #####################################################################
 
+AC_ARG_ENABLE([experimental],
+        AS_HELP_STRING([--enable-experimental], [enable experimental tools and features. Do not enable it unless you know what you are doing. @<:@default=disabled@:>@]),
+        [], enable_experimental=no)
+AM_CONDITIONAL([BUILD_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
+AS_IF([test "x$enable_experimental" = "xyes"], [
+	AC_DEFINE(ENABLE_EXPERIMENTAL, [1], [Experimental features.])
+])
+
 AC_ARG_ENABLE([tools],
         AS_HELP_STRING([--disable-tools], [disable building tools that provide same functionality as module-init-tools @<:@default=enabled@:>@]),
 	[], enable_tools=yes)
@@ -279,6 +287,7 @@
 	cflags:			${with_cflags} ${CFLAGS}
 	ldflags:		${with_ldflags} ${LDFLAGS}
 
+	experimental features:  ${enable_experimental}
 	tools:			${enable_tools}
 	python bindings:	${enable_python}
 	logging:		${enable_logging}
diff --git a/tools/kmod.c b/tools/kmod.c
index 5ebe70a..c9d2cc8 100644
--- a/tools/kmod.c
+++ b/tools/kmod.c
@@ -40,10 +40,13 @@
 
 static const struct kmod_cmd *kmod_cmds[] = {
 	&kmod_cmd_help,
-	&kmod_cmd_insert,
 	&kmod_cmd_list,
-	&kmod_cmd_remove,
 	&kmod_cmd_static_nodes,
+
+#ifdef ENABLE_EXPERIMENTAL
+	&kmod_cmd_insert,
+	&kmod_cmd_remove,
+#endif
 };
 
 static const struct kmod_cmd *kmod_compat_cmds[] = {