build/include: Only install headers for enabled options

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
diff --git a/include/osmocom/core/Makefile.am b/include/osmocom/core/Makefile.am
index 1ef3769..adf7220 100644
--- a/include/osmocom/core/Makefile.am
+++ b/include/osmocom/core/Makefile.am
@@ -2,11 +2,19 @@
 		   bitvec.h statistics.h utils.h socket.h \
 		   gsmtap.h write_queue.h prim.h \
 		   logging.h rate_ctr.h gsmtap_util.h \
-		   plugin.h crc16.h panic.h process.h msgfile.h \
+		   crc16.h panic.h process.h \
 		   backtrace.h conv.h application.h
 
+if ENABLE_PLUGIN
+osmocore_HEADERS += plugin.h
+endif
+
 if ENABLE_TALLOC
 osmocore_HEADERS += talloc.h
 endif
 
+if ENABLE_MSGFILE
+osmocore_HEADERS += msgfile.h
+endif
+
 osmocoredir = $(includedir)/osmocom/core