add configure option '--disable-vty' to prevent building libosmovty
diff --git a/configure.in b/configure.in
index 6e42773..cc8fdf6 100644
--- a/configure.in
+++ b/configure.in
@@ -44,6 +44,12 @@
 	[enable_tests=0], [enable_tests=1])
 AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "x1")
 
+AC_ARG_ENABLE(vtyc,
+	[  --disable-vty Disable building VTY telnet interface ],
+	[enable_vty=0], [enable_vty=1])
+AM_CONDITIONAL(ENABLE_VTY, test "x$enable_vty" = "x1")
+
+
 AC_OUTPUT(
 	libosmocore.pc
 	libosmovty.pc
diff --git a/include/osmocom/Makefile.am b/include/osmocom/Makefile.am
index c9023e6..71293d1 100644
--- a/include/osmocom/Makefile.am
+++ b/include/osmocom/Makefile.am
@@ -1 +1,3 @@
+if ENABLE_VTY
 SUBDIRS = vty
+endif
diff --git a/src/vty/Makefile.am b/src/vty/Makefile.am
index bc10a0f..f2859cf 100644
--- a/src/vty/Makefile.am
+++ b/src/vty/Makefile.am
@@ -5,7 +5,9 @@
 INCLUDES = $(all_includes) -I$(top_srcdir)/include
 AM_CFLAGS = -fPIC -Wall
 
+if ENABLE_VTY
 lib_LTLIBRARIES = libosmovty.la
 
 libosmovty_la_SOURCES = buffer.c command.c vty.c vector.c utils.c \
 			telnet_interface.c logging_vty.c
+endif