diff --git a/Makefile.am b/Makefile.am index 59633c3dd03a2e97551047c2c140b13bb54ef22f..184268ea8c615023867f4b2852cdd6a197e90620 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,9 @@ libopusurl_la_LIBADD = libopusfile.la $(URL_DEPS_LIBS) libopusurl_la_LDFLAGS = -no-undefined \ -version-info @OP_LT_CURRENT@:@OP_LT_REVISION@:@OP_LT_AGE@ +if OP_ENABLE_EXAMPLES noinst_PROGRAMS = examples/opusfile_example examples/seeking_example +endif examples_opusfile_example_SOURCES = examples/opusfile_example.c examples_seeking_example_SOURCES = examples/seeking_example.c diff --git a/configure.ac b/configure.ac index d68666cc97a91a5bacb1b9ae0bfe924c0d57a10b..83de37d76be9b6f532c6138bc45fadb3f6765c4b 100644 --- a/configure.ac +++ b/configure.ac @@ -124,6 +124,11 @@ AS_IF([test "$enable_fixed_point" = "yes"], ] ) +AC_ARG_ENABLE([examples], + AS_HELP_STRING([--disable-examples], [Disable building of examples]),, + enable_examples=yes) +AM_CONDITIONAL([OP_ENABLE_EXAMPLES], [test "$enable_examples" = "yes"]) + AS_CASE(["$ac_cv_search_lrintf"], ["no"],[], ["none required"],[], @@ -172,6 +177,7 @@ AC_MSG_NOTICE([ Hidden visibility ............ ${cc_cv_flag_visibility} + Building Examples ............ ${enable_examples} API documentation ............ ${enable_doc} ------------------------------------------------------------------------ ])