[Mplayer-cvslog] CVS: main configure,1.87,1.88 dvdauth.c,1.6,1.7 mplayer.c,1.161,1.162 stream.c,1.10,1.11 vcd_read_fbsd.c,1.2,1.3 configure.FreeBSD,1.2,NONE

GEREOFFY arpi_esp at users.sourceforge.net
Thu Jun 21 02:06:42 CEST 2001


Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv31605

Modified Files:
	configure dvdauth.c mplayer.c stream.c vcd_read_fbsd.c 
Removed Files:
	configure.FreeBSD 
Log Message:
FreeBSD patch by Vladimir Kushnir <vkushnir at Alfacom.net>

Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.87
retrieving revision 1.88
diff -C2 -r1.87 -r1.88
*** configure	2001/06/16 18:10:32	1.87
--- configure	2001/06/21 00:06:40	1.88
***************
*** 143,146 ****
--- 143,148 ----
  
          --with-x11libdir=DIR    X library files are in DIR
+         --with-x11incdir=DIR    X headerss are in DIR
+                                 (only needed if autodetection fails)
          --with-win32libdir=DIR  windows codec files
          --with-csslibdir=DIR    directory contains libcss.so shared library
***************
*** 149,153 ****
          --with-sdl-config=PATH  specify location of sdl-config if it's not in your PATH
                                  (example: --with-sdl-config=/usr/sdl/bin/sdl-config)
! 
  	--size-x=SIZE		default screen width
  	--size-y=SIZE		default screen height
--- 151,158 ----
          --with-sdl-config=PATH  specify location of sdl-config if it's not in your PATH
                                  (example: --with-sdl-config=/usr/sdl/bin/sdl-config)
!         --with-extralibdir=DIR  extra library files (png, SDL) are in DIR
!                                 (only needed if autodetection fails)
!         --with-extraincdir=DIR extra headers (png, SDL) are in DIR
!                                 (only needed if autodetection fails)
  	--size-x=SIZE		default screen width
  	--size-y=SIZE		default screen height
***************
*** 161,164 ****
--- 166,178 ----
  echo "Please wait while ./configure discovers your software and hardware environment!"
  
+ # Determine our OS name and OS dependent libs
+ 
+ system_name=`uname -s 2>&1`
+ if [ "$system_name" = "FreeBSD" ]; then
+ _archlibs="-rdynamic -pthread"
+ else
+ _archlibs="-ldl -lpthread"
+ fi
+ 
  # LGB: temporary files
  
***************
*** 202,208 ****
--- 216,240 ----
  fi
  
+ _x11incdir=
+ if [ -d /usr/include/X11 ]; then
+  _x11incdir=
+ elif [ -d /usr/X11R6 ]; then
+  _x11incdir=-I/usr/X11R6/include
+ elif [ -d /usr/X11 ]; then
+  _x11incdir=-I/usr/X11/include
+ fi
+ 
+ # Lots of stuff are installed under /usr/local
+ 
+ _extralibdir=-L/usr/local/lib
+ _extraincdir=-I/usr/local/include
+ 
  _skip_cc_check=no
  _skip_as_check=no
+ if [ "$system_name" = "FreeBSD" ]; then
+ _sdlconfig='sdl11-config'
+ else
  _sdlconfig='sdl-config'
+ fi
  
  for ac_option
***************
*** 224,227 ****
--- 256,262 ----
          _x11libdir=-L`echo $ac_option | cut -d '=' -f 2`
          ;;
+   --with-x11incdir=*)
+         _x11incdir=-I`echo $ac_option | cut -d '=' -f 2`
+         ;;
    --enable-x11)
          _x11=yes
***************
*** 233,236 ****
--- 268,277 ----
          _sdlconfig=`echo $ac_option | cut -d '=' -f 2`
          ;;
+   --with-extralibdir=*)
+         _extralibdir=-L`echo $ac_option | cut -d '=' -f 2`
+         ;;
+   --with-extraincdir=*)
+         _extraincdir=-I`echo $ac_option | cut -d '=' -f 2`
+         ;;
   esac
  done
***************
*** 266,269 ****
--- 307,314 ----
  	# linux with /proc mounted, extract cpu information from it
  	_cpuinfo="cat /proc/cpuinfo"
+ elif [ -r /compat/linux/proc/cpuinfo ]; then
+         # FreeBSD with linux emulation /proc mounted, 
+ 	# extract cpu information from it
+         _cpuinfo="cat /compat/linux/proc/cpuinfo"
  else
  	# all other OS try to extract cpu information from a small helper
***************
*** 524,531 ****
  
  
! $_cc $TMPC -o $TMPO -lvgagl -lvga > /dev/null 2>&1 && _svga=yes
  
  $_cc $TMPC -o $TMPO -lpthread > /dev/null 2>&1 || \
   { echo "Lib pthread not found."; rm -f $TMPC $TMPO $TMPS ; exit 1; }
  
  # Atmosfear: added SDL versioncheck and autodetect; removed warnings.
--- 569,581 ----
  
  
! $_cc $_extraincdir $_extralibdir $TMPC -o $TMPO -lvgagl -lvga > /dev/null 2>&1 && _svga=yes
  
+ if [ "$system_name" = "FreeBSD" ]; then
+ $_cc $TMPC -o $TMPO -pthread > /dev/null 2>&1 || \
+  { echo "Lib pthread not found."; rm -f $TMPC $TMPO $TMPS ; exit 1; }
+ else
  $_cc $TMPC -o $TMPO -lpthread > /dev/null 2>&1 || \
   { echo "Lib pthread not found."; rm -f $TMPC $TMPO $TMPS ; exit 1; }
+ fi
  
  # Atmosfear: added SDL versioncheck and autodetect; removed warnings.
***************
*** 570,574 ****
  
  _png=no
! $_cc $TMPC -o $TMPO -lpng -lz -lm > /dev/null 2>&1 && _png=yes
  
  _ggi=no
--- 620,624 ----
  
  _png=no
! $_cc $_extraincdir $_extralibdir $TMPC -o $TMPO -lpng -lz -lm > /dev/null 2>&1 && _png=yes
  
  _ggi=no
***************
*** 599,603 ****
--- 649,657 ----
  $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXxf86vm $_socklib > /dev/null 2>&1 && _vm=yes
  
+ if [ "$system_name" = "FreeBSD" ]; then
+ $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL -pthread $_socklib > /dev/null 2>&1 && _gl=yes
+ else
  $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL $_socklib > /dev/null 2>&1 && _gl=yes
+ fi
  
  cat > $TMPC << EOF
***************
*** 605,610 ****
--- 659,669 ----
  int main( void ) { return 0; }
  EOF
+ if [ "$system_name" = "FreeBSD" ]; then
+ $_cc $_x11incdir $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL -pthread $_socklib > /dev/null 2>&1 || \
+  { _gl=no; echo "GL includes not found!";}
+ else
  $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lGL $_socklib > /dev/null 2>&1 || \
   { _gl=no; echo "GL includes not found!";}
+ fi
  
  cat > $TMPC << EOF
***************
*** 615,619 ****
  EOF
  
! $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm $_socklib > /dev/null 2>&1 && _dga=yes
  # Note: the -lXxf86vm library is the VideoMode extension and though it's
  # not needed for DGA, AFAIK every distribution packages together with DGA
--- 674,678 ----
  EOF
  
! $_cc -I/usr/X11R6/unclude $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm $_socklib > /dev/null 2>&1 && _dga=yes
  # Note: the -lXxf86vm library is the VideoMode extension and though it's
  # not needed for DGA, AFAIK every distribution packages together with DGA
***************
*** 631,635 ****
  
  _dga2=no
! $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm $_socklib > /dev/null 2>&1 && _dga2=yes
  
  fi
--- 690,694 ----
  
  _dga2=no
! $_cc $_x11incdir $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm $_socklib > /dev/null 2>&1 && _dga2=yes
  
  fi
***************
*** 700,704 ****
  EOF
  
! $_cc -o $TMPO -lesd $TMPC 2> /dev/null || { _esd=no; }
  
  # ---
--- 759,763 ----
  EOF
  
! $_cc $_extraincdir $_extralibdir -o $TMPO -lesd $TMPC 2> /dev/null || { _esd=no; }
  
  # ---
***************
*** 921,924 ****
--- 980,989 ----
    --with-x11libdir=*)
  	;;
+   --with-x11incdir=*)
+         ;;
+   --with-extralibdir=*)
+         ;;
+   --with-extraincdir=*)
+         ;;
    --prefix=*)
  	_prefix=`echo $ac_option | cut -d '=' -f 2`
***************
*** 1002,1006 ****
  # Checking kernel version...
  _k_verc_problem=no
! system_name=`uname -s 2>&1`
  kernel_version=`uname -r 2>&1`
  echo $_echo_n "Checking $system_name kernel version ... $_echo_c"
--- 1067,1071 ----
  # Checking kernel version...
  _k_verc_problem=no
! if [ "$system_name" != "FreeBSD" ];then
  kernel_version=`uname -r 2>&1`
  echo $_echo_n "Checking $system_name kernel version ... $_echo_c"
***************
*** 1019,1022 ****
--- 1084,1088 ----
  echo "$kernel_version, ok"
  fi
+ fi
  
  if [ $_x11 = 'yes' ]; then
***************
*** 1068,1072 ****
--- 1134,1147 ----
  
  if [ $_gl = yes ]; then
+    if [ "$system_name" = "FreeBSD" ]; then
+       # Under XFree86 4.x GL port is poorly designed
+       if [ -r /usr/X11R6/bin/XFree86 ]; then
+          _gllib='-lGL -pthread'
+       else
+          _gllib='-lGL'
+       fi
+    else
     _gllib='-lGL'
+    fi
  fi
  
***************
*** 1220,1226 ****
  X11DIR=$_x11libdir
  # OPTFLAGS=-O4 $_profile $_debug -march=$proc -mcpu=$proc -pipe -fomit-frame-pointer -ffast-math
! OPTFLAGS=$CFLAGS
  # LIBS=-L/usr/lib -L/usr/local/lib $_x11libdir $_gllib $_sdllib $_ggilib $_dgalib $_x11lib $_xvlib
! X_LIBS=$_x11libdir $_gllib $_sdllib $_ggilib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib $_libpng $_socklib
  TERMCAP_LIB=$_libtermcap
  XMM_LIBS = $_xmmplibs
--- 1295,1301 ----
  X11DIR=$_x11libdir
  # OPTFLAGS=-O4 $_profile $_debug -march=$proc -mcpu=$proc -pipe -fomit-frame-pointer -ffast-math
! OPTFLAGS=$CFLAGS $_x11incdir $_extraincdir
  # LIBS=-L/usr/lib -L/usr/local/lib $_x11libdir $_gllib $_sdllib $_ggilib $_dgalib $_x11lib $_xvlib
! X_LIBS=$_x11libdir $_extralibdir $_gllib $_sdllib $_ggilib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib $_libpng $_socklib
  TERMCAP_LIB=$_libtermcap
  XMM_LIBS = $_xmmplibs
***************
*** 1236,1240 ****
  ESD_LIB = $_esdlib
  prefix = $_prefix
! ARCH_LIBS = -ldl -lpthread
  STREAM_SRCS = $_streamingsrcs
  
--- 1311,1315 ----
  ESD_LIB = $_esdlib
  prefix = $_prefix
! ARCH_LIBS = $_archlibs
  STREAM_SRCS = $_streamingsrcs
  

Index: dvdauth.c
===================================================================
RCS file: /cvsroot/mplayer/main/dvdauth.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** dvdauth.c	2001/06/18 23:56:19	1.6
--- dvdauth.c	2001/06/21 00:06:40	1.7
***************
*** 20,24 ****
  # undef	 OLD_CSS_API
  #else
! # if defined(__NetBSD__) || defined(__OpenBSD__)
  #  include <sys/dvdio.h>
  # elif defined(__linux__)
--- 20,24 ----
  # undef	 OLD_CSS_API
  #else
! # if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
  #  include <sys/dvdio.h>
  # elif defined(__linux__)

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.161
retrieving revision 1.162
diff -C2 -r1.161 -r1.162
*** mplayer.c	2001/06/18 14:19:13	1.161
--- mplayer.c	2001/06/21 00:06:40	1.162
***************
*** 23,26 ****
--- 23,29 ----
  #if	defined(sun)
  #define	DEFAULT_CDROM_DEVICE	"/vol/dev/aliases/cdrom0"
+ #elif defined(__FreeBSD__)
+ #define DEFAULT_CDROM_DEVICE    "/dev/cdrom"
+ #include <sys/cdrio.h>
  #else
  #define	DEFAULT_CDROM_DEVICE	"/dev/cdrom"
***************
*** 492,495 ****
--- 495,501 ----
  int vcd_cache_size=128;
  #endif
+ #ifdef __FreeBSD__
+ int bsize = VCD_SECTOR_SIZE;
+ #endif
  char* title="MPlayer";
  
***************
*** 631,634 ****
--- 637,645 ----
  #ifdef VCD_CACHE
    vcd_cache_init(vcd_cache_size);
+ #endif
+ #ifdef __FreeBSD__
+   if (ioctl (f, CDRIOCSETBLOCKSIZE, &bsize) == -1) {
+         perror ( "Error in CDRIOCSETBLOCKSIZE");
+   }
  #endif
    stream=new_stream(f,STREAMTYPE_VCD);

Index: stream.c
===================================================================
RCS file: /cvsroot/mplayer/main/stream.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** stream.c	2001/06/05 18:40:44	1.10
--- stream.c	2001/06/21 00:06:40	1.11
***************
*** 11,15 ****
  
  #ifdef __FreeBSD__
- #warning "VCD support under FreeBSD not implemented yet"
  #include "vcd_read_fbsd.c" 
  #else
--- 11,14 ----

Index: vcd_read_fbsd.c
===================================================================
RCS file: /cvsroot/mplayer/main/vcd_read_fbsd.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** vcd_read_fbsd.c	2001/06/05 18:40:44	1.2
--- vcd_read_fbsd.c	2001/06/21 00:06:40	1.3
***************
*** 5,14 ****
  #define	CDROM_LEADOUT	0xAA
  
! typedef	struct {
! 	unsigned char   unused;
! 	unsigned char   minute;
! 	unsigned char   second;
! 	unsigned char   frame;
! } cdrom_msf;
  
  static struct ioc_read_toc_single_entry vcd_entry;
--- 5,15 ----
  #define	CDROM_LEADOUT	0xAA
  
! typedef struct {
! 	uint8_t sync            [12];
! 	uint8_t header          [4];
! 	uint8_t subheader       [8];
! 	uint8_t data            [2324];
! 	uint8_t spare           [4];
! } cdsector_t;
  
  static struct ioc_read_toc_single_entry vcd_entry;
***************
*** 77,87 ****
  }
  
! static char vcd_buf[VCD_SECTOR_SIZE];
  
  static int vcd_read(int fd,char *mem){
!       memcpy(vcd_buf,&vcd_entry.entry.addr.msf,sizeof(cdrom_msf));
! /*      if(ioctl(fd,CDROMREADRAW,vcd_buf)==-1) return 0; */ // EOF?
! /*      if(ioctl(fd,CDRIOCSETBLOCKSIZE,VCD_SECTOR_SIZE)==-1) return 0;
!       if (pread(fd,vcd_buf,VCD_SECTOR_SIZE,ntohl(vcd_entry.entry.addr.lba)*VCD_SECTOR_SIZE) != VCD_SECTOR_SIZE) return 0; */ // EOF?
        vcd_entry.entry.addr.msf.frame++;
        if (vcd_entry.entry.addr.msf.frame==75){
--- 78,89 ----
  }
  
! static cdsector_t vcd_buf;
  
  static int vcd_read(int fd,char *mem){
! 	off_t offset = 0;
!       if (pread(fd,&vcd_buf,VCD_SECTOR_SIZE,vcd_get_msf()*VCD_SECTOR_SIZE)
! 	 != VCD_SECTOR_SIZE) return 0;  // EOF?
!       offset++;
! 
        vcd_entry.entry.addr.msf.frame++;
        if (vcd_entry.entry.addr.msf.frame==75){
***************
*** 93,98 ****
          }
        }
! 
!       memcpy(mem,&vcd_buf[VCD_SECTOR_OFFS],VCD_SECTOR_DATA);
        return VCD_SECTOR_DATA;
  }
--- 95,99 ----
          }
        }
!       memcpy(mem,vcd_buf.data,VCD_SECTOR_DATA);
        return VCD_SECTOR_DATA;
  }

--- configure.FreeBSD DELETED ---


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list