summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gui/mplayer/gtk/fs.h2
-rw-r--r--Gui/mplayer/psignal.h4
-rw-r--r--Makefile12
-rwxr-xr-xconfigure10
-rw-r--r--linux/getch2.c6
-rw-r--r--vcd_read.h8
6 files changed, 28 insertions, 14 deletions
diff --git a/Gui/mplayer/gtk/fs.h b/Gui/mplayer/gtk/fs.h
index 841eceac2d..21eb043323 100644
--- a/Gui/mplayer/gtk/fs.h
+++ b/Gui/mplayer/gtk/fs.h
@@ -9,7 +9,7 @@
#include <glob.h>
#include <unistd.h>
-#ifdef __SVR4
+#if defined(__SVR4) || defined(__bsdi__)
#define get_current_dir_name() getcwd(NULL, PATH_MAX)
#endif
diff --git a/Gui/mplayer/psignal.h b/Gui/mplayer/psignal.h
index 58bd1007d5..54a492f91c 100644
--- a/Gui/mplayer/psignal.h
+++ b/Gui/mplayer/psignal.h
@@ -39,6 +39,10 @@
#define mplIncAudioBufferDelay 28
#define mplDecAudioBufferDelay 29
+#ifdef __bsdi__
+#define _NSIG NSIG
+#endif
+
#ifdef __SVR4
#define SIGTYPE SIGUSR2
#warning should we use SIGUSR1 or SIGUSR2 on linux, bsd, ... too?
diff --git a/Makefile b/Makefile
index 54f1ecd3d6..2a12ef8fbd 100644
--- a/Makefile
+++ b/Makefile
@@ -113,15 +113,19 @@ $(PRG_CFG): version.h codec-cfg.c codec-cfg.h
$(CC) $(CFLAGS) -g codec-cfg.c -o $(PRG_CFG) -DCODECS2HTML
install: $(PRG) $(PRG_FIBMAP)
- install -d $(BINDIR)
+ if [ ! -e $(BINDIR) ]; then \
+ mkdir -p $(BINDIR); \
+ fi
install -m 755 -s $(PRG) $(BINDIR)/$(PRG)
- install -d $(prefix)/man/man1
- install -m 644 DOCS/mplayer.1 $(prefix)/man/man1/mplayer.1
+ if [ ! -e $(prefix)/man/man1 ]; then \
+ mkdir -p $(prefix)/man/man1; \
+ fi
+ install -c -m 644 DOCS/mplayer.1 $(prefix)/man/man1/mplayer.1
@echo "Following task requires root privs. If it fails don't panic"
@echo "however it means you can't use fibmap_mplayer."
@echo "Without this (or without running mplayer as root) you won't be"
@echo "able to play encrypted DVDs."
- install -o 0 -g 0 -m 4755 -s $(PRG_FIBMAP) $(BINDIR)/$(PRG_FIBMAP)
+ -install -o 0 -g 0 -m 4755 -s $(PRG_FIBMAP) $(BINDIR)/$(PRG_FIBMAP)
clean:
rm -f *.o *~ $(OBJS)
diff --git a/configure b/configure
index 7920f7b2de..b241bdca17 100755
--- a/configure
+++ b/configure
@@ -298,7 +298,7 @@ echo "Detected host architecture: $host_arch"
# Determine OS dependent libs
_confcygwin="TARGET_CYGWIN=no"
_confwin32=
-if [ "$system_name" = "FreeBSD" -o "$system_name" = "OpenBSD" ]; then
+if [ "$system_name" = "FreeBSD" -o "$system_name" = "OpenBSD" -o "$system_name" = "BSD/OS" ]; then
_archlibs="-rdynamic -pthread"
elif [ `echo $system_name | sed 's/[cC][yY][gG][wW][iI][nN].*/CYGWIN/'` = "CYGWIN" ]; then
_confcygwin="TARGET_CYGWIN=yes"
@@ -308,6 +308,10 @@ else
_archlibs="-ldl -lpthread"
fi
+if [ "$system_name" = "BSD/OS" ]; then
+ _archlibs="$_archlibs -ldvd"
+fi
+
# LGB: temporary files
TMPC="mplayer-conf-${RANDOM}-$$-${RANDOM}.c"
@@ -765,7 +769,7 @@ echo Using ... "$_mp_help" file
$_cc $_extraincdir $_extralibdir $TMPC -o $TMPO -lvgagl -lvga > /dev/null 2>&1 && _svga=yes
-if [ "$system_name" = "FreeBSD" -o "$system_name" = "OpenBSD" ]; then
+if [ "$system_name" = "FreeBSD" -o "$system_name" = "OpenBSD" -o "$system_name" = "BSD/OS" ]; then
$_cc $TMPC -o $TMPO -pthread > /dev/null 2>&1 || \
{ echo "Lib pthread not found."; rm -f $TMPC $TMPO $TMPS ; exit 1; }
else
@@ -855,7 +859,7 @@ fi
if [ $_x11 = yes ]; then
$_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXdpms $_socklib > /dev/null 2>&1 && _xdpms_3=yes
-nm `echo $_x11libdir|cut -b 3-`/libXext.a | grep DPMSQueryExtension > /dev/null 2>&1 && _xdpms_4=yes
+nm `echo $_x11libdir|cut -c 3-`/libXext.a | grep DPMSQueryExtension > /dev/null 2>&1 && _xdpms_4=yes
$_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXv $_socklib > /dev/null 2>&1 && _xv=yes
$_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXxf86vm $_socklib > /dev/null 2>&1 && _vm=yes
diff --git a/linux/getch2.c b/linux/getch2.c
index 621adf5a84..8401617d40 100644
--- a/linux/getch2.c
+++ b/linux/getch2.c
@@ -205,7 +205,7 @@ void getch2_enable(){
struct termios tio_new;
#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__)
tcgetattr(0,&tio_orig);
-#elif defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
ioctl(0,TIOCGETA,&tio_orig);
#else
ioctl(0,TCGETS,&tio_orig);
@@ -216,7 +216,7 @@ struct termios tio_new;
tio_new.c_cc[VTIME] = 0;
#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__)
tcsetattr(0,TCSANOW,&tio_new);
-#elif defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
ioctl(0,TIOCSETA,&tio_new);
#else
ioctl(0,TCSETS,&tio_new);
@@ -228,7 +228,7 @@ void getch2_disable(){
if(!getch2_status) return; // already disabled / never enabled
#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__)
tcsetattr(0,TCSANOW,&tio_orig);
-#elif defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
ioctl(0,TIOCSETA,&tio_orig);
#else
ioctl(0,TCSETS,&tio_orig);
diff --git a/vcd_read.h b/vcd_read.h
index c30dfa6f3f..9d6564be7a 100644
--- a/vcd_read.h
+++ b/vcd_read.h
@@ -1,11 +1,13 @@
//=================== VideoCD ==========================
-#if defined(linux) || defined(sun)
+#if defined(linux) || defined(sun) || defined(__bsdi__)
#if defined(linux)
#include <linux/cdrom.h>
#elif defined(sun)
#include <sys/cdio.h>
static int sun_vcd_read(int, int*);
+#elif defined(__bsdi__)
+#include <dvd.h>
#endif
@@ -79,7 +81,7 @@ void vcd_read_toc(int fd){
static char vcd_buf[VCD_SECTOR_SIZE];
static int vcd_read(int fd,char *mem){
-#if defined(linux)
+#if defined(linux) || defined(__bsdi__)
memcpy(vcd_buf,&vcd_entry.cdte_addr.msf,sizeof(struct cdrom_msf));
if(ioctl(fd,CDROMREADRAW,vcd_buf)==-1) return 0; // EOF?
memcpy(mem,&vcd_buf[VCD_SECTOR_OFFS],VCD_SECTOR_DATA);
@@ -236,7 +238,7 @@ int vcd_cache_read(int fd,char* mem){
++vcd_cache_index;if(vcd_cache_index>=vcd_cache_size)vcd_cache_index=0;
// read data!
vcd_set_msf(vcd_cache_current);
-#if defined(linux)
+#if defined(linux) || defined(__bsdi__)
memcpy(vcd_buf,&vcd_entry.cdte_addr.msf,sizeof(struct cdrom_msf));
if(ioctl(fd,CDROMREADRAW,vcd_buf)==-1) return 0; // EOF?
memcpy(mem,&vcd_buf[VCD_SECTOR_OFFS],VCD_SECTOR_DATA);