diff --git a/Makefile.am b/Makefile.am index 58c1d0f..8bccb28 100644 --- a/Makefile.am +++ b/Makefile.am @@ -122,6 +122,7 @@ EXTRA_DIST = \ tests/key_encrypted.pem \ tests/res_query_dump.c +if EXAMPLES ## Examples noinst_PROGRAMS = \ examples/active \ @@ -165,6 +166,7 @@ examples_uuid_LDADD = $(STROPHE_LIBS) examples_vcard_SOURCES = examples/vcard.c examples_vcard_CFLAGS = $(STROPHE_FLAGS) examples_vcard_LDADD = $(STROPHE_LIBS) +endif ## Tests diff --git a/configure.ac b/configure.ac index 701e44c..ed52466 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,10 @@ AS_CASE([$PLATFORM], [haiku], [], [WARNING_FLAGS="$WARNING_FLAGS -Wextra"]) +AC_ARG_ENABLE([examples], + [AS_HELP_STRING([--disable-examples], [turn off examples])], + [case "${enableval}" in yes) examples=true ;; no) examples=false ;; *) AC_MSG_ERROR([bad value ${enableval} for --disable-examples]) ;; esac],[examples=true]) +AM_CONDITIONAL([EXAMPLES], [test x$examples = xtrue]) AC_ARG_WITH([libxml2], [AS_HELP_STRING([--with-libxml2], [use libxml2 for XML parsing, expat is the default])]) AC_ARG_WITH([gnutls],