Commit c3d56a68 authored by Simon Jackson's avatar Simon Jackson Committed by Ralph Giles

Add configure option to stop examples being built, --disable-examples.

- Added new configure option --disable-examples which can be used to
  stop the example programs being built. This can be useful in some
  situations, such as when cross compiling static libraries.

- Examples are still built by default, --disable-examples must be passed
  explicitly to stop them being built.
Signed-off-by: Ralph Giles's avatarRalph Giles <giles@thaumas.net>
parent bb765c37
......@@ -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
......
......@@ -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}
------------------------------------------------------------------------
])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment