--
uses the same flag logic as --disable-gpl
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
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-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-optim disable optimization in libraries"
BUILD_NETWORK="1"
BUILD_DISCS="1"
GPL="1"
BUILD_NETWORK="1"
BUILD_DISCS="1"
GPL="1"
if test ! -f "../../contrib/src/main.mak"
then
if test ! -f "../../contrib/src/main.mak"
then
--disable-sout)
BUILD_ENCODERS=
;;
--disable-sout)
BUILD_ENCODERS=
;;
+ --disable-optim)
+ WITH_OPTIMIZATION=
+ ;;
--enable-small)
ENABLE_SMALL=1
;;
--enable-small)
ENABLE_SMALL=1
;;
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 "$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 "$WITH_OPTIMIZATION" || add_make_enabled "WITH_OPTIMIZATION"
CXXFLAGS := $(CXXFLAGS) $(EXTRA_CFLAGS) -g
EXTRA_LDFLAGS += -L$(PREFIX)/lib
LDFLAGS := $(LDFLAGS) $(EXTRA_LDFLAGS)
CXXFLAGS := $(CXXFLAGS) $(EXTRA_CFLAGS) -g
EXTRA_LDFLAGS += -L$(PREFIX)/lib
LDFLAGS := $(LDFLAGS) $(EXTRA_LDFLAGS)
+
+ifndef WITH_OPTIMIZATION
+CFLAGS := $(CFLAGS) -O0
+CXXFLAGS := $(CXXFLAGS) -O0
+endif
+
# Do not export those! Use HOSTVARS.
# Do the FPU detection, after we have figured out our compilers and flags.
# Do not export those! Use HOSTVARS.
# Do the FPU detection, after we have figured out our compilers and flags.