[MPlayer-dev-eng] [PATCH] add a --with-dvbincdir option to configure

Götz Waschk waschk at informatik.uni-rostock.de
Tue May 20 12:58:41 CEST 2003


Hi everyone,

this patch adds a --with-dvbincdir to configure. This was motivated by
a header conflict between DVB and dxr3, at least on Mandrake. Both
have a header called linux/em8300.h. The solution is not to add the
dvb includes to the dxr3 related files. That's why there's an extra
rule for vo_mpegpes.o in libvo/Makefile.

This should also apply on 0.90, but there you only need to modify configure
and libvo/Makefile.

CU
-- 
What difference does it make to the dead, the orphans and the
homeless, whether the mad destruction is wrought under the name of
totalitarianism or the holy name of liberty or democracy?
    Mahatma Gandhi (1869 - 1948), "Non-Violence in Peace and War"
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.265
diff -u -r1.265 Makefile
--- Makefile	17 May 2003 12:23:32 -0000	1.265
+++ Makefile	20 May 2003 09:59:32 -0000
@@ -38,7 +38,7 @@
 CODEC_LIBS = $(AV_LIB) $(FAME_LIB) $(MAD_LIB) $(VORBIS_LIB) $(THEORA_LIB) $(FAAD_LIB) $(LIBLZO_LIB) $(DECORE_LIB) $(XVID_LIB) $(PNG_LIB) $(Z_LIB) $(JPEG_LIB) $(ALSA_LIB) $(XMMS_LIB) $(MATROSKA_LIB) 
 COMMON_LIBS = libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a $(CSS_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(MPLAYER_NETWORK_LIB) $(WIN32_LIB) $(GIF_LIB) $(MACOSX_FRAMEWORKS) $(SMBSUPPORT_LIB) $(FRIBIDI_LIB)
 
-CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(FREETYPE_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(SDL_INC) $(FRIBIDI_INC) # -Wall
+CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(FREETYPE_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(SDL_INC) $(FRIBIDI_INC) $(DVB_INC) # -Wall
 
 ifeq ($(TARGET_ALTIVEC),yes)
 ifeq ($(TARGET_OS),Darwin)
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.708
diff -u -r1.708 configure
--- configure	18 May 2003 10:49:54 -0000	1.708
+++ configure	20 May 2003 09:59:32 -0000
@@ -273,11 +273,12 @@
   --disable-gcc-checking   disable gcc version checking [enable]
 
 Use these options if autodetection fails:
-  --with-extraincdir=DIR   extra headers (png, dvb, mad, sdl, css, ...) in DIR
+  --with-extraincdir=DIR   extra headers (png, mad, sdl, css, ...) in DIR
   --with-extralibdir=DIR   extra library files (png, SDL, ...) in DIR
   --with-x11incdir=DIR     X headers in DIR
   --with-x11libdir=DIR     X library files in DIR
   --with-dxr2incdir=DIR    DXR2 headers in DIR
+  --with-dvbincdir=DIR     DVB headers in DIR
   --with-csslibdir=DIR     libcss in DIR
   --with-madlibdir=DIR     libmad (libmad shared library) in DIR
   --with-mlibdir=DIR       libmlib (MLIB support) in DIR (Solaris only)
@@ -1409,6 +1410,9 @@
   --with-dxr2incdir=*)
     _inc_dxr2=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
     ;;
+  --with-dvbincdir=*)
+    _inc_dvb=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
+    ;;
   --with-xvidcore=*)
     _xvidcore=`echo $ac_option | cut -d '=' -f 2`
     ;;
@@ -2969,7 +2973,7 @@
         _dvb=yes
         echores "yes"
     else
-      for I in "-I/usr/src/DVB/ost/include" "$_inc_extra/ost/include" ; do
+      for I in "-I/usr/src/DVB/ost/include" "$_inc_dvb"; do
         if cc_check "$I" ; then
           _dvb=yes
           _inc_dvb="$I"
@@ -2977,7 +2981,7 @@
           break
         fi
       done
-      test "$_dvb" = no && echores "no (specify path to DVB/ost/include with --with-extraincdir=DIR)"
+      test "$_dvb" = no && echores "no (specify path to DVB/ost/include with --with-dvbincdir=DIR)"
     fi
 else
     echores "no"
@@ -3010,7 +3014,7 @@
       _dvbhead=yes
       echores "yes"
     else
-      for I in "-I/usr/src/DVB/include" "$_inc_extra/include/linux" ; do
+      for I in "-I/usr/src/DVB/include" "$_inc_dvb" ; do
         if cc_check "$I" ; then
           _dvbhead=yes
           _inc_dvb="$I"
@@ -3018,7 +3022,7 @@
           break
         fi
       done
-      test "$_dvbhead" = no && echores "no (specify path to DVB/include (HEAD Version) with --with-extraincdir=DIR)"
+      test "$_dvbhead" = no && echores "no (specify path to DVB/include (HEAD Version) with --with-dvbincdir=DIR)"
     fi
   else
     echores "no"
Index: libmpdemux/Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/Makefile,v
retrieving revision 1.64
diff -u -r1.64 Makefile
--- libmpdemux/Makefile	17 May 2003 12:24:01 -0000	1.64
+++ libmpdemux/Makefile	20 May 2003 09:59:33 -0000
@@ -34,7 +34,7 @@
 OBJS	= $(SRCS:.c=.o)
 OBJS   += $(CPLUSPLUSSRCS:.cpp=.o)
 INCLUDE = -I../loader $(CSS_INC) $(EXTRA_INC)
-CFLAGS  = $(OPTFLAGS) $(INCLUDE) $(XMMS_CFLAGS) $(CDPARANOIA_INC)
+CFLAGS  = $(OPTFLAGS) $(INCLUDE) $(XMMS_CFLAGS) $(CDPARANOIA_INC) $(DVB_INC)
 CPLUSPLUSFLAGS  = $(CFLAGS) $(CPLUSPLUSINCLUDE)
 CPLUSPLUS = $(CC)
 
Index: libvo/Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/Makefile,v
retrieving revision 1.39
diff -u -r1.39 Makefile
--- libvo/Makefile	10 Nov 2002 13:12:53 -0000	1.39
+++ libvo/Makefile	20 May 2003 09:59:33 -0000
@@ -10,7 +10,7 @@
 SRCS += vosub_vidix.c
 endif
 
-CFLAGS  = $(OPTFLAGS) -I. -I.. $(FREETYPE_INC) $(SDL_INC) $(X11_INC) $(EXTRA_INC) $(DXR2_INC) $(DVB_INC) $(DIRECTFB_INC) -DMPG12PLAY #-Wall
+CFLAGS  = $(OPTFLAGS) -I. -I.. $(FREETYPE_INC) $(SDL_INC) $(X11_INC) $(EXTRA_INC) $(DXR2_INC) $(DIRECTFB_INC) -DMPG12PLAY #-Wall
 ifeq ($(VIDIX),yes)
 CFLAGS += -DVIDIX_PATH='"$(prefix)/lib/mplayer/vidix/"'
 endif
@@ -25,6 +25,9 @@
 
 $(LIBNAME):     $(OBJS)
 	$(AR) r $(LIBNAME) $(OBJS)
+
+vo_mpegpes.o: vo_mpegpes.c
+	$(CC) -c $(CFLAGS) $(DVB_INC) -o $@ $<
 
 all:    $(LIBNAME)
 


More information about the MPlayer-dev-eng mailing list