Debug/optimization patch by (Glenn Maynard <g_sf at zewt dot org>)

Originally committed as revision 2240 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Glenn Maynard 2003-09-09 19:03:14 +00:00 committed by Michael Niedermayer
parent d0526ecf66
commit cddf3f452a
4 changed files with 28 additions and 18 deletions

39
configure vendored
View File

@ -78,6 +78,8 @@ mingw32="no"
cygwin="no"
os2="no"
lshared="no"
optimize="yes"
debug="yes"
extralibs="-lm"
simpleidct="yes"
bigendian="no"
@ -97,7 +99,6 @@ LIBSUF=".a"
SLIBPREF="lib"
SLIBSUF=".so"
risky="yes"
small="no"
amr_nb="no"
amr_nb_fixed="no"
sunmlib="no"
@ -108,7 +109,7 @@ case $targetos in
BeOS)
prefix="/boot/home/config"
# helps building libavcodec
CFLAGS="-O3 -DPIC -fomit-frame-pointer"
CFLAGS="-DPIC -fomit-frame-pointer"
# 3 gcc releases known for BeOS, each with ugly bugs
gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
case "$gcc_version" in
@ -174,13 +175,13 @@ FFSLDFLAGS=-Wl,-bind_at_load
gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
case "$gcc_version" in
*2.95*)
CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer"
CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer"
;;
*3.3*)
CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL"
CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL"
;;
*)
CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic"
CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic"
;;
esac
;;
@ -215,7 +216,7 @@ TMPE=$TMPE".exe"
ar="emxomfar -p64"
ranlib="echo ignoring ranlib"
strip="echo ignoring strip"
CFLAGS="-Zomf -O3"
CFLAGS="-Zomf"
LDFLAGS="-Zomf -Zstack 16384 -s"
SHFLAGS=""
FFSLDFLAGS=""
@ -333,6 +334,10 @@ for opt do
;;
--enable-shared) lshared="yes"
;;
--disable-debug) debug="no"
;;
--disable-opts) optimize="no"
;;
--disable-mpegaudio-hp) mpegaudio_hp="no"
;;
--disable-ffserver) ffserver="no"
@ -341,7 +346,7 @@ for opt do
;;
--disable-risky) risky="no"
;;
--enable-small) small="yes"
--enable-small) optimize="small"
;;
--enable-amr_nb) amr_nb="yes"
;;
@ -494,11 +499,6 @@ EOF
$cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
fi
# Checking for CFLAGS
if test -z "$CFLAGS"; then
CFLAGS="-O3"
fi
if test "$mingw32" = "yes" ; then
v4l="no"
audio_oss="no"
@ -723,11 +723,19 @@ if test "$sdl" = "no" ; then
ffplay=no
fi
if test "$small" = "yes"; then
if test "$debug" = "yes"; then
CFLAGS="$CFLAGS -g"
fi
if test "$optimize" = "small"; then
# CFLAGS=${CFLAGS//-O3/-Os}
CFLAGS="$CFLAGS -Os"
fi
if test "$optimize" = "yes"; then
CFLAGS="$CFLAGS -O3"
fi
if test x"$mandir" = x""; then
mandir="${prefix}/man"
fi
@ -779,6 +787,8 @@ echo " --disable-zlib disable zlib [default=no]"
echo " --disable-simple_idct disable simple IDCT routines [default=no]"
echo " --disable-vhook disable video hooking support"
echo " --enable-gprof enable profiling with gprof [$gprof]"
echo " --disable-debug disable debugging symbols"
echo " --disable-opts disable compiler optimizations"
echo " --disable-mpegaudio-hp faster (but less accurate)"
echo " mpegaudio decoding [default=no]"
echo " --disable-ffserver disable ffserver build"
@ -815,6 +825,8 @@ echo "faadbin enabled $faadbin"
echo "a52 support $a52"
echo "a52 dlopened $a52bin"
echo "pp support $pp"
echo "debug symbols $debug"
echo "optimize $optimize"
echo "shared pp $shared_pp"
echo "Video hooking $vhook"
echo "SDL support $sdl"
@ -822,7 +834,6 @@ if test $sdl_too_old = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
fi
echo "risky / patent encumbered codecs $risky"
echo "optimize for size $small"
if test "$vhook" = "yes" ; then
echo "Imlib2 support $imlib2"

View File

@ -7,8 +7,7 @@ include ../config.mak
VPATH=$(SRC_PATH)/libavcodec
# NOTE: -I.. is needed to include config.h
CFLAGS= $(OPTFLAGS) -Wall -g -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
LDFLAGS= -g
CFLAGS= $(OPTFLAGS) -Wall -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
OBJS= common.o utils.o mem.o allcodecs.o \
mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\

View File

@ -6,7 +6,7 @@ include ../config.mak
VPATH=$(SRC_PATH)/libavformat
CFLAGS= $(OPTFLAGS) -Wall -g -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
CFLAGS= $(OPTFLAGS) -Wall -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
OBJS= utils.o cutils.o os_support.o allformats.o
PPOBJS=

View File

@ -2,7 +2,7 @@ include ../config.mak
VPATH=$(SRC_PATH)/vhook
CFLAGS=-fPIC $(OPTFLAGS) -g -Wall -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H
CFLAGS=-fPIC $(OPTFLAGS) -Wall -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H
ifeq ($(CONFIG_DARWIN),yes)
SHFLAGS+=-bundle -flat_namespace -undefined suppress