summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rwxr-xr-xconfigure26
-rw-r--r--libmpeg2/Makefile6
-rw-r--r--libvo/Makefile2
4 files changed, 31 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index c79978f6b3..d0413ffe8b 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ SRCS = mp_msg.c open.c parse_es.c ac3-iec958.c find_sub.c aviprint.c dec_audio.c
OBJS = $(SRCS:.c=.o)
CFLAGS = $(OPTFLAGS) -Iloader -Ilibvo $(CSS_INC) $(EXTRA_INC) # -Wall
A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3 $(ALSA_LIB) $(ESD_LIB)
-VO_LIBS = -Llibvo -lvo $(X_LIBS)
+VO_LIBS = -Llibvo -lvo $(MLIB_LIB) $(X_LIBS)
PARTS = mp3lib libac3 libmpeg2 opendivx libavcodec encore libvo libao2 drivers drivers/syncfb
diff --git a/configure b/configure
index 399bf3ba08..daead9574f 100755
--- a/configure
+++ b/configure
@@ -451,7 +451,7 @@ _vm=no
_xdpms=no
_3dfx=no
_syncfb=no
-_mlib=no
+_mlib=no _mlibdir=/opt/SUNWmlib
_xmga=autodetect
_dga=no
_dga2=no
@@ -897,9 +897,18 @@ EOF
$_cc $_extraincdir $_extralibdir -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE $TMPC -o $TMPO -ldvdread > /dev/null 2>&1 && \
{ _dvdread=yes;_largefiles=yes; }
+
+cat > $TMPC << EOF
+#include <mlib.h>
+int main( void ) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
+EOF
+$_cc $_extraincdir $_extralibdir -I$_mlibdir/include $TMPC -o $TMPO -L$_mlibdir/lib -lmlib 9>/dev/null 2>&1 && _mlib=yes;
+
+
rm -f $TMPC $TMPO
+
# ---
# check availability of some header files
@@ -1253,6 +1262,10 @@ for ac_option do
_cssincdir=`echo $ac_option | cut -d '=' -f 2`
_css='yes';
;;
+ --with-mlibdir=*)
+ _mlibdir=`echo $ac_option | cut -d '=' -f 2`
+ _mlib=yes
+ ;;
--size-x=*)
_x=`echo $ac_option | cut -d '=' -f 2`
;;
@@ -1450,6 +1463,7 @@ echo "Checking for OSS Audio ... $_oss_audio"
echo "Checking for ALSA Audio ... $_alsaver"
echo "Checking for ESD Audio ... $_esd"
echo "Checking for Sun Audio ... $_sun_audio"
+echo "Checking for Sun mediaLib ... $_mlib"
echo "Checking for DeCSS support ... $_css"
echo "Checking for DVDread support ... $_dvdread"
echo "Checking for PNG support ... $_png"
@@ -1765,9 +1779,12 @@ fi
if [ $_mlib = yes ]; then
_mlib='#define HAVE_MLIB'
+ _mlibinc="-I$_mlibdir/include"
+ _mliblib="-L$_mlibdir/lib -R$_mlibdir/lib -lmlib"
_vosrc=$_vosrc' yuv2rgb_mlib.c'
else
_mlib='#undef HAVE_MLIB'
+ _mlibinc= _mliblib=
fi
# ---
@@ -1930,6 +1947,8 @@ ARCH_LIBS = $_archlibs
STREAM_SRCS = $_streamingsrcs
DECORE_LIBS = $_decorelibs
DIVX4LINUX=$_divx4linux
+MLIB_INC = $_mlibinc
+MLIB_LIB = $_mliblib
# --- Some stuff for autoconfigure ----
$_target_arch
@@ -2109,6 +2128,11 @@ $_ssem // only define if you have SSE (Intel Pentium III/4 or Celeron II)
#define USE_MMX_IDCT
#endif
+/* libmpeg2 uses a different feature test macro for mediaLib */
+#ifdef HAVE_MLIB
+#define LIBMPEG2_MLIB
+#endif
+
/* libvo options */
#define SCREEN_SIZE_X $_x
#define SCREEN_SIZE_Y $_y
diff --git a/libmpeg2/Makefile b/libmpeg2/Makefile
index d3b9630b05..476e09b95e 100644
--- a/libmpeg2/Makefile
+++ b/libmpeg2/Makefile
@@ -3,9 +3,11 @@ LIBNAME = libmpeg2.a
include ../config.mak
-SRCS = header.c idct.c idct_mmx.c motion_comp.c motion_comp_mmx.c slice.c stats.c decode.c
+SRCS = header.c idct.c idct_mmx.c idct_mlib.c \
+ motion_comp.c motion_comp_mmx.c motion_comp_mlib.c \
+ slice.c stats.c decode.c
OBJS = $(SRCS:.c=.o)
-INCLUDE = -I. -I../libvo -I.. $(EXTRA_INC)
+INCLUDE = -I. -I../libvo -I.. $(EXTRA_INC) $(MLIB_INC)
CFLAGS = $(OPTFLAGS) $(INCLUDE) -DMPG12PLAY
.SUFFIXES: .c .o
diff --git a/libvo/Makefile b/libvo/Makefile
index b7e789bae8..91037be03d 100644
--- a/libvo/Makefile
+++ b/libvo/Makefile
@@ -10,7 +10,7 @@ ifeq ($(TARGET_ARCH_X86),yes)
SRCS += rgb15to16mmx.c yuv2rgb_mmx.c
endif
-CFLAGS = $(OPTFLAGS) -I. -I.. $(SDL_INC) $(X11_INC) $(EXTRA_INC) -DMPG12PLAY #-Wall
+CFLAGS = $(OPTFLAGS) -I. -I.. $(SDL_INC) $(X11_INC) $(EXTRA_INC) $(MLIB_INC) -DMPG12PLAY #-Wall
# -I/usr/X11R6/include/
.SUFFIXES: .c .o