Commit 5700ed2f authored by Konstantin Pavlov's avatar Konstantin Pavlov

Added a configure switch to enable/disable examples build

parent 9f2289a6
...@@ -2,7 +2,12 @@ ...@@ -2,7 +2,12 @@
ACLOCAL_AMFLAGS=-I m4 ACLOCAL_AMFLAGS=-I m4
SUBDIRS = src examples misc SUBDIRS = src
if BUILD_EXAMPLES
SUBDIRS += examples misc
endif
DIST_SUBDIRS = $(SUBDIRS) doc DIST_SUBDIRS = $(SUBDIRS) doc
EXTRA_DIST = libdvbpsi.spec libdvbpsi.spec.in libdvbpsi.pc.in bootstrap EXTRA_DIST = libdvbpsi.spec libdvbpsi.spec.in libdvbpsi.pc.in bootstrap
...@@ -15,9 +20,6 @@ doc-dummy: ...@@ -15,9 +20,6 @@ doc-dummy:
doc: doc-dummy doc: doc-dummy
$(MAKE) -C doc doc $(MAKE) -C doc doc
test_dr.c:
$(MAKE) -C misc test_dr.c
changelog: changelog:
cvs2cl --utc --hide-filenames --no-wrap -w --stdout -g -z9 | \ cvs2cl --utc --hide-filenames --no-wrap -w --stdout -g -z9 | \
sed -e 's/^[^0-9]/ /' -e 's/^ *$$//' -e 's/^ \* / /g' | \ sed -e 's/^[^0-9]/ /' -e 's/^ *$$//' -e 's/^ \* / /g' | \
...@@ -30,5 +32,10 @@ dist-checksum: $(DIST_ARCHIVES) ...@@ -30,5 +32,10 @@ dist-checksum: $(DIST_ARCHIVES)
sha256sum $$sum > $$sum.sha256; \ sha256sum $$sum > $$sum.sha256; \
done done
if BUILD_EXAMPLES
test_dr.c:
$(MAKE) -C misc test_dr.c
generate-header_dr: generate-header_dr:
misc/gen_dr_h.sh > src/descriptors/dr.h misc/gen_dr_h.sh > src/descriptors/dr.h
endif
...@@ -145,6 +145,16 @@ if test "${ac_cv_asprintf}" != "no"; then ...@@ -145,6 +145,16 @@ if test "${ac_cv_asprintf}" != "no"; then
AC_DEFINE(HAVE_ASPRINTF, 1, [Support for asprintf() and vasprintf()]) AC_DEFINE(HAVE_ASPRINTF, 1, [Support for asprintf() and vasprintf()])
fi fi
# dnl Whether or not build examples
AC_ARG_ENABLE([examples],
[AS_HELP_STRING([--enable-examples],
[build examples (default is yes)])],
[build_examples=$enableval],
[build_examples=yes])
dnl use examples
AM_CONDITIONAL([BUILD_EXAMPLES], [ test $build_examples = "yes" ])
dnl dnl
dnl Generate Makefiles and other output files dnl Generate Makefiles and other output files
dnl dnl
...@@ -166,4 +176,5 @@ release : ${release} ...@@ -166,4 +176,5 @@ release : ${release}
compatibility old api : ${compat} compatibility old api : ${compat}
compile flags : ${CFLAGS} compile flags : ${CFLAGS}
build for : ${SYS} build for : ${SYS}
build examples : ${build_examples}
" "
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