ACLOCAL_AMFLAGS = -I libltdl/m4
-SUBDIRS = libltdl src bindings .
+SUBDIRS =
-INCLUDES = $(LTDLINCL)
+if BUILD_INCLUDED_LTDL
+SUBDIRS += libltdl
+endif
+
+SUBDIRS += proto src bindings .
+
+AM_CPPFLAGS = $(LTDLINCL)
EXTRA_DIST = contrib version-gen.sh