Commit 7807d25f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

contrib: add option to turn off (L)GPL version 3

parent f6b40afd
......@@ -31,6 +31,7 @@ usage()
echo " --disable-sout configure to not build stream output packages"
echo " --enable-small optimize libraries for size with slight speed decrease [DANGEROUS]"
echo " --disable-gpl configure to not build viral GPL code"
echo " --disable-gnuv3 configure to not build version 3 (L)GPL code"
echo " --disable-optim disable optimization in libraries"
}
......@@ -43,6 +44,7 @@ BUILD_ENCODERS="1"
BUILD_NETWORK="1"
BUILD_DISCS="1"
GPL="1"
GNUV3="1"
WITH_OPTIMIZATION="1"
if test ! -f "../../contrib/src/main.mak"
......@@ -85,6 +87,9 @@ do
--disable-gpl)
GPL=
;;
--disable-gnuv3)
GNUV3=
;;
--disable-*)
PKGS_DISABLE="${PKGS_DISABLE} ${1#--disable-}"
;;
......@@ -246,6 +251,7 @@ test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS"
test -z "$BUILD_NETWORK" || add_make_enabled "BUILD_NETWORK"
test -z "$ENABLE_SMALL" || add_make_enabled "ENABLE_SMALL"
test -z "$GPL" || add_make_enabled "GPL"
test -z "$GNUV3" || add_make_enabled "GNUV3"
test -z "$WITH_OPTIMIZATION" || add_make_enabled "WITH_OPTIMIZATION"
test "`uname -o`" != "Msys" || add_make "CMAKE_GENERATOR := -G \"MSYS Makefiles\""
......
......@@ -358,6 +358,13 @@ REQUIRE_GPL =
else
REQUIRE_GPL = @echo "Package \"$<\" requires the GPL license." >&2; exit 1
endif
ifdef GNUV3
REQUIRE_GNUV3 =
else
REQUIRE_GNUV3 = \
@echo "Package \"$<\" requires the version 3 of GNU licenses." >&2; \
exit 1
endif
#
# Per-package build rules
......
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