Commit 6e023978 authored by Roman Shaposhnik's avatar Roman Shaposhnik

Changes for SPARC/Solaris compatibility. Now it should be possible to

build and test ffmpeg on SPARC/Solaris 8+ out of the box.

Originally committed as revision 1778 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent deabd4fd
...@@ -53,6 +53,12 @@ INSTALLVHOOK=install-vhook ...@@ -53,6 +53,12 @@ INSTALLVHOOK=install-vhook
CLEANVHOOK=clean-vhook CLEANVHOOK=clean-vhook
endif endif
ifeq ($(TARGET_OS), SunOS)
TEST=/usr/bin/test
else
TEST=test
endif
OBJS = ffmpeg.o ffserver.o OBJS = ffmpeg.o ffserver.o
SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s) SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
FFLIBS = -L./libavformat -lavformat -L./libavcodec -lavcodec FFLIBS = -L./libavformat -lavformat -L./libavcodec -lavcodec
...@@ -112,7 +118,7 @@ endif ...@@ -112,7 +118,7 @@ endif
.libs: lib .libs: lib
@test -f .libs || touch .libs @test -f .libs || touch .libs
@for i in $(DEP_LIBS) ; do if test $$i -nt .libs ; then touch .libs; fi ; done @for i in $(DEP_LIBS) ; do if $(TEST) $$i -nt .libs ; then touch .libs; fi ; done
clean: $(CLEANVHOOK) clean: $(CLEANVHOOK)
$(MAKE) -C libavcodec clean $(MAKE) -C libavcodec clean
......
...@@ -568,8 +568,7 @@ EOF ...@@ -568,8 +568,7 @@ EOF
freetype2=no freetype2=no
if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
which freetype-config > /dev/null if test "`which freetype-config`" != ""; then
if test $? -eq 0; then
if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then
freetype2=yes freetype2=yes
fi fi
...@@ -864,6 +863,10 @@ if test "$os2" = "yes" ; then ...@@ -864,6 +863,10 @@ if test "$os2" = "yes" ; then
echo "CONFIG_OS2=yes" >> config.mak echo "CONFIG_OS2=yes" >> config.mak
fi fi
if test "$TARGET_OS" = "SunOS" ; then
echo "#define CONFIG_SUNOS 1" >> $TMPH
fi
if test "$darwin" = "yes"; then if test "$darwin" = "yes"; then
echo "#define CONFIG_DARWIN 1" >> $TMPH echo "#define CONFIG_DARWIN 1" >> $TMPH
echo "CONFIG_DARWIN=yes" >> config.mak echo "CONFIG_DARWIN=yes" >> config.mak
......
...@@ -30,4 +30,8 @@ static inline float floorf(float f) { return floor(f); } ...@@ -30,4 +30,8 @@ static inline float floorf(float f) { return floor(f); }
static inline int strcasecmp(const char* s1, const char* s2) { return stricmp(s1,s2); } static inline int strcasecmp(const char* s1, const char* s2) { return stricmp(s1,s2); }
#endif #endif
#if defined(CONFIG_SUNOS)
static inline float floorf(float f) { return floor(f); }
#endif
#endif /* _OS_SUPPORT_H */ #endif /* _OS_SUPPORT_H */
...@@ -73,4 +73,4 @@ dsptest: dsptest.c $(DSPDEPS) ...@@ -73,4 +73,4 @@ dsptest: dsptest.c $(DSPDEPS)
clean: clean:
rm -rf vsynth1 vsynth2 data rm -rf vsynth1 vsynth2 data
rm -f asynth1.sw *~ audiogen videogen rm -f asynth1.sw *~ audiogen videogen rotozoom tiny_psnr
...@@ -4,6 +4,14 @@ ...@@ -4,6 +4,14 @@
# #
# #
#set -x #set -x
# Even in the 21st century some diffs are not supporting -u.
diff -u $0 $0 > /dev/null 2>&1
if [ $? -eq 0 ]; then
diff_cmd="diff -u"
else
diff_cmd="diff"
fi
set -e set -e
datadir="./data" datadir="./data"
...@@ -61,7 +69,7 @@ do_ffmpeg() ...@@ -61,7 +69,7 @@ do_ffmpeg()
shift shift
echo $ffmpeg -bitexact -dct_algo 1 -idct_algo 2 $* echo $ffmpeg -bitexact -dct_algo 1 -idct_algo 2 $*
$ffmpeg -bitexact -dct_algo 1 -idct_algo 2 -benchmark $* > $datadir/bench.tmp 2> /tmp/ffmpeg$$ $ffmpeg -bitexact -dct_algo 1 -idct_algo 2 -benchmark $* > $datadir/bench.tmp 2> /tmp/ffmpeg$$
grep -v -e ^Stream -e ^Press -e ^Input -e ^Output -e ^frame -e '^ Stream' /tmp/ffmpeg$$ || true egrep -v "^(Stream|Press|Input|Output|frame| Stream)" /tmp/ffmpeg$$ || true
rm -f /tmp/ffmpeg$$ rm -f /tmp/ffmpeg$$
md5sum -b $f >> $logfile md5sum -b $f >> $logfile
if [ $f = $raw_dst ] ; then if [ $f = $raw_dst ] ; then
...@@ -377,7 +385,7 @@ fi ...@@ -377,7 +385,7 @@ fi
if diff -u $logfile $reffile ; then if $diff_cmd $logfile $reffile ; then
echo echo
echo Regression test succeeded. echo Regression test succeeded.
exit 0 exit 0
......
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