configure: Make examples optional
diff --git a/example/Makefile.am b/example/Makefile.am
index 3d8e3cf..fa40acb 100644
--- a/example/Makefile.am
+++ b/example/Makefile.am
@@ -1,5 +1,9 @@
 noinst_PROGRAMS =
 
+if BUILD_EXAMPLES
+
 noinst_PROGRAMS += follow
 follow_SOURCES = follow.cpp
 follow_LDADD = $(SDEVENTPLUS_LIBS)
+
+endif