Commit 6b933b9e authored by Sam Hocevar's avatar Sam Hocevar

  * Got Makefile to launch ./configure almost properly. $(MAKECMDGOALS) rules !
  * Various debian scripts fixes.
  * Added -lmsvcrt40 to the win32 flags for proper execution under Wine.
  * Fixed broken soname setting under Solaris (and OS X, sort of).
  * Made the illegal instruction report more explicit.
  * BSD/OS 4.3beta1 fixes by Steven M. Schultz <sms@TO.GD-ES.COM>.
parent 851ffa75
...@@ -109,17 +109,16 @@ all: Makefile.opts vlc ${ALIASES} vlc.app ...@@ -109,17 +109,16 @@ all: Makefile.opts vlc ${ALIASES} vlc.app
Makefile.opts: Makefile.opts:
@echo "**** No configuration found, running ./configure..." @echo "**** No configuration found, running ./configure..."
./configure ./configure
$(MAKE) $(MAKECMDGOALS)
# Include Makefile.opts again in case we just generated it exit
ifneq (1,$(HAVE_MAKEFILE_OPTS))
-include Makefile.opts
endif
show: show:
@echo CC: $(CC) @echo CC: $(CC)
@echo CFLAGS: $(CFLAGS) @echo CFLAGS: $(CFLAGS)
@echo DCFLAGS: $(DCFLAGS) @echo DCFLAGS: $(DCFLAGS)
@echo LCFLAGS: $(LCFLAGS) @echo LCFLAGS: $(LCFLAGS)
@echo PCFLAGS: $(PCFLAGS)
@echo PLCFLAGS: $(PLCFLAGS)
@echo C_OBJ: $(C_OBJ) @echo C_OBJ: $(C_OBJ)
@echo CPP_OBJ: $(CPP_OBJ) @echo CPP_OBJ: $(CPP_OBJ)
@echo PLUGIN_OBJ: $(PLUGIN_OBJ) @echo PLUGIN_OBJ: $(PLUGIN_OBJ)
...@@ -227,9 +226,9 @@ snapshot-common: clean ...@@ -227,9 +226,9 @@ snapshot-common: clean
configure configure.in install-sh config.sub config.guess \ configure configure.in install-sh config.sub config.guess \
/tmp/vlc/ /tmp/vlc/
# Copy Debian control files # Copy Debian control files
for file in debian/*dirs debian/*menu debian/*desktop ; do \ for file in debian/*dirs debian/*docs debian/*menu debian/*desktop \
cp $$file /tmp/vlc/debian ; done debian/*copyright ; do cp $$file /tmp/vlc/debian ; done
for file in control changelog rules vlc.copyright vlc.docs ; do \ for file in control changelog rules ; do \
cp debian/$$file /tmp/vlc/debian/ ; done cp debian/$$file /tmp/vlc/debian/ ; done
# Copy fonts and icons # Copy fonts and icons
for file in share/*png share/*xpm share/*psf ; do \ for file in share/*png share/*xpm share/*psf ; do \
......
...@@ -46,7 +46,7 @@ default: ...@@ -46,7 +46,7 @@ default:
-include $(MAKECMDGOALS) -include $(MAKECMDGOALS)
$(C_DEP): .dep/%.d: %.c $(C_DEP): .dep/%.d: %.c
@test -d .dep/$(dir $*) || mkdir -p .dep/$(dir $*) @test -d .dep/$(dir $*) || mkdir -p $(shell dirname .dep/$*)
@echo "regenerating dependencies for $*.c" @echo "regenerating dependencies for $*.c"
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) 2>/dev/null $< \ @$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) 2>/dev/null $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \ | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
...@@ -54,7 +54,7 @@ $(C_DEP): .dep/%.d: %.c ...@@ -54,7 +54,7 @@ $(C_DEP): .dep/%.d: %.c
[ -s $@ ] || rm -f $@' [ -s $@ ] || rm -f $@'
$(CPP_DEP): .dep/%.dpp: %.cpp $(CPP_DEP): .dep/%.dpp: %.cpp
@test -d .dep/$(dir $*) || mkdir -p .dep/$(dir $*) @test -d .dep/$(dir $*) || mkdir -p $(shell dirname .dep/$$*)
@echo "regenerating dependencies for $*.c" @echo "regenerating dependencies for $*.c"
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) 2>/dev/null $< \ @$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) 2>/dev/null $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \ | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
......
...@@ -75,6 +75,7 @@ LIB_GLIDE = @LIB_GLIDE@ ...@@ -75,6 +75,7 @@ LIB_GLIDE = @LIB_GLIDE@
LIB_GNOME = @LIB_GNOME@ LIB_GNOME = @LIB_GNOME@
LIB_GTK = @LIB_GTK@ LIB_GTK = @LIB_GTK@
LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@ LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
LIB_KDE = @LIB_KDE@ LIB_KDE = @LIB_KDE@
LIB_MACOSX = @LIB_MACOSX@ LIB_MACOSX = @LIB_MACOSX@
LIB_QNX = @LIB_QNX@ LIB_QNX = @LIB_QNX@
...@@ -171,7 +172,7 @@ endif ...@@ -171,7 +172,7 @@ endif
# Libraries # Libraries
# #
ifneq (,$(findstring mingw32,$(SYS))) ifneq (,$(findstring mingw32,$(SYS)))
LIB += -lws2_32 -lnetapi32 LIB += -lws2_32 -lnetapi32 -lmsvcrt40
endif endif
LIB += -L/usr/local/lib @LIB@ LIB += -L/usr/local/lib @LIB@
...@@ -252,6 +253,11 @@ ifneq (,$(findstring mingw32,$(SYS))) ...@@ -252,6 +253,11 @@ ifneq (,$(findstring mingw32,$(SYS)))
LCFLAGS += -mwindows -Xlinker --force-exe-suffix LCFLAGS += -mwindows -Xlinker --force-exe-suffix
endif endif
#
# C compiler and linker flags: setting soname
#
SOFLAGS += @SOFLAGS@
# #
# C compiler flags: plugin compilation # C compiler flags: plugin compilation
# #
......
This diff is collapsed.
...@@ -20,8 +20,9 @@ if test -r extras/libdvdcss/libdvdcss.c; then ...@@ -20,8 +20,9 @@ if test -r extras/libdvdcss/libdvdcss.c; then
AC_SUBST(LIBDVDCSS_VERSION) AC_SUBST(LIBDVDCSS_VERSION)
fi fi
dnl Save CFLAGS dnl Save CFLAGS and LDFLAGS
save_CFLAGS="${CFLAGS}" save_CFLAGS="${CFLAGS}"
save_LDFLAGS="${LDFLAGS}"
dnl Check for tools dnl Check for tools
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
...@@ -72,6 +73,7 @@ AC_FUNC_MMAP ...@@ -72,6 +73,7 @@ AC_FUNC_MMAP
AC_TYPE_SIGNAL AC_TYPE_SIGNAL
AC_CHECK_LIB(dl,dlopen,LIB="${LIB} -ldl") AC_CHECK_LIB(dl,dlopen,LIB="${LIB} -ldl")
AC_CHECK_LIB(m,pow,LIB_YUV="${LIB_YUV} -lm") AC_CHECK_LIB(m,pow,LIB_YUV="${LIB_YUV} -lm")
AC_CHECK_LIB(dvd,dvd_cdrom_ioctl,LIB_LIBDVDCSS="${LIB_LIBDVDCSS} -ldvd")
CPPFLAGS="${CPPFLAGS} -I/usr/local/include" CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
CFLAGS="${CFLAGS} -I/usr/local/include" CFLAGS="${CFLAGS} -I/usr/local/include"
...@@ -126,20 +128,41 @@ AC_TRY_COMPILE([],, ...@@ -126,20 +128,41 @@ AC_TRY_COMPILE([],,
dnl Check for Darwin plugin linking flags dnl Check for Darwin plugin linking flags
CFLAGS="${save_CFLAGS} -bundle -undefined suppress" CFLAGS="${save_CFLAGS} -bundle -undefined suppress"
AC_MSG_CHECKING([if \$CC compiles plugins with -bundle -undefined suppress]) AC_MSG_CHECKING([if \$CC accepts -bundle -undefined suppress])
AC_TRY_COMPILE([],, AC_TRY_COMPILE([],,
PLCFLAGS="${PLCFLAGS} -bundle -undefined suppress"; AC_MSG_RESULT(yes), PLCFLAGS="${PLCFLAGS} -bundle -undefined suppress"; AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)) AC_MSG_RESULT(no))
dnl Check for standard plugin linking flags dnl Check for standard plugin linking flags
CFLAGS="${save_CFLAGS} -shared" CFLAGS="${save_CFLAGS} -shared"
AC_MSG_CHECKING([if \$CC compiles plugins with -shared]) AC_MSG_CHECKING([if \$CC accepts -shared])
AC_TRY_COMPILE([],, AC_TRY_COMPILE([],,
PLCFLAGS="${PLCFLAGS} -shared"; AC_MSG_RESULT(yes), PLCFLAGS="${PLCFLAGS} -shared"; AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)) AC_MSG_RESULT(no))
dnl Check for standard soname setting
if test x"${SOFLAGS}" = x; then
try_SOFLAGS="-Wl,-soname -Wl,"
LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
AC_MSG_CHECKING([if linker accepts ${try_SOFLAGS}foo.so.0])
AC_TRY_LINK([],,
SOFLAGS="${try_SOFLAGS}"; AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
fi
dnl Check for SunOS soname setting
if test x"${SOFLAGS}" = x; then
try_SOFLAGS="-Wl,-h -Wl,"
LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
AC_MSG_CHECKING([if linker accepts ${try_SOFLAGS}foo.so.0])
AC_TRY_LINK([],,
SOFLAGS="${try_SOFLAGS}"; AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
fi
dnl End of the bizarre compilation tests dnl End of the bizarre compilation tests
CFLAGS="${save_CFLAGS}" CFLAGS="${save_CFLAGS}"
LDFLAGS="${save_LDFLAGS}"
dnl Check for boolean_t dnl Check for boolean_t
AC_MSG_CHECKING([for boolean_t in sys/types.h]) AC_MSG_CHECKING([for boolean_t in sys/types.h])
...@@ -197,8 +220,9 @@ AC_CHECK_HEADERS(winioctl.h,[ ...@@ -197,8 +220,9 @@ AC_CHECK_HEADERS(winioctl.h,[
dnl for Un*x and BeOS dnl for Un*x and BeOS
AC_CHECK_HEADERS(sys/ioctl.h,[ AC_CHECK_HEADERS(sys/ioctl.h,[
CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}" CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
AC_CHECK_HEADERS(sys/cdio.h sys/dvdio.h linux/cdrom.h) AC_CHECK_HEADERS(sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h)
BSD_DVD_STRUCT=0 BSD_DVD_STRUCT=0
LINUX_DVD_STRUCT=0
dnl dnl
dnl Old FreeBSD: sys/cdio.h dnl Old FreeBSD: sys/cdio.h
dnl dnl
...@@ -215,17 +239,34 @@ AC_CHECK_HEADERS(sys/ioctl.h,[ ...@@ -215,17 +239,34 @@ AC_CHECK_HEADERS(sys/ioctl.h,[
Define if <sys/cdio.h> defines dvd_struct.) Define if <sys/cdio.h> defines dvd_struct.)
BSD_DVD_STRUCT=1 BSD_DVD_STRUCT=1
]) ])
if test x$BSD_DVD_STRUCT = x1; then
AC_DEFINE(HAVE_BSD_DVD_STRUCT, 1,
Define if BSD-like dvd_struct is defined.)
fi
dnl dnl
dnl Linux: linux/cdrom.h dnl Linux: linux/cdrom.h
dnl dnl
AC_EGREP_HEADER(dvd_struct,linux/cdrom.h,[ AC_EGREP_HEADER(dvd_struct,linux/cdrom.h,[
AC_DEFINE(DVD_STRUCT_IN_LINUX_CDROM_H, 1, AC_DEFINE(DVD_STRUCT_IN_LINUX_CDROM_H, 1,
Define if <linux/cdrom.h> defines DVD_STRUCT.) Define if <linux/cdrom.h> defines DVD_STRUCT.)
LINUX_DVD_STRUCT=1
])
dnl
dnl BSDI: dvd.h
dnl
AC_EGREP_HEADER(dvd_struct,dvd.h,[
AC_DEFINE(DVD_STRUCT_IN_DVD_H, 1,
Define if <dvd.h> defines DVD_STRUCT.)
LINUX_DVD_STRUCT=1
]) ])
dnl
dnl Final tests to check what was detected
dnl
if test x$LINUX_DVD_STRUCT = x1; then
AC_DEFINE(HAVE_LINUX_DVD_STRUCT, 1,
Define if Linux-like dvd_struct is defined.)
else
if test x$BSD_DVD_STRUCT = x1; then
AC_DEFINE(HAVE_BSD_DVD_STRUCT, 1,
Define if BSD-like dvd_struct is defined.)
fi
fi
]) ])
...@@ -233,6 +274,9 @@ dnl ...@@ -233,6 +274,9 @@ dnl
dnl Check the operating system dnl Check the operating system
dnl dnl
case ${host_os} in case ${host_os} in
bsdi*)
SYS=bsdi
;;
darwin*) darwin*)
SYS=darwin SYS=darwin
;; ;;
...@@ -343,8 +387,8 @@ AC_ARG_WITH(dvdcss, ...@@ -343,8 +387,8 @@ AC_ARG_WITH(dvdcss,
STATIC_LIBDVDCSS=1 STATIC_LIBDVDCSS=1
BUILTINS="${BUILTINS} dvd" BUILTINS="${BUILTINS} dvd"
CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss" CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
LIB_DVD="${LIB_DVD} lib/libdvdcss.a" LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a" LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
fi fi
;; ;;
xlocal-shared) xlocal-shared)
...@@ -364,6 +408,7 @@ AC_ARG_WITH(dvdcss, ...@@ -364,6 +408,7 @@ AC_ARG_WITH(dvdcss,
BUILTINS="${BUILTINS} dvd" BUILTINS="${BUILTINS} dvd"
OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o" OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA" CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
LIB_DVD="${LIB_DVD} -ldl" LIB_DVD="${LIB_DVD} -ldl"
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl" LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
;; ;;
...@@ -386,8 +431,8 @@ AC_ARG_WITH(dvdcss, ...@@ -386,8 +431,8 @@ AC_ARG_WITH(dvdcss,
STATIC_LIBDVDCSS=1 STATIC_LIBDVDCSS=1
BUILTINS="${BUILTINS} dvd" BUILTINS="${BUILTINS} dvd"
CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss" CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
LIB_DVD="${LIB_DVD} lib/libdvdcss.a" LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a" LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
else else
# XXX: no check for libdl is done, don't try this at home ! # XXX: no check for libdl is done, don't try this at home !
DUMMY_LIBDVDCSS=1 DUMMY_LIBDVDCSS=1
...@@ -790,8 +835,9 @@ AC_SUBST(WINDRES) ...@@ -790,8 +835,9 @@ AC_SUBST(WINDRES)
AC_SUBST(LCFLAGS) AC_SUBST(LCFLAGS)
AC_SUBST(PLCFLAGS) AC_SUBST(PLCFLAGS)
AC_SUBST(LIB) AC_SUBST(SOFLAGS)
AC_SUBST(LIB)
AC_SUBST(LIB_ALSA) AC_SUBST(LIB_ALSA)
AC_SUBST(LIB_BEOS) AC_SUBST(LIB_BEOS)
AC_SUBST(LIB_DARWIN) AC_SUBST(LIB_DARWIN)
...@@ -803,6 +849,7 @@ AC_SUBST(LIB_GLIDE) ...@@ -803,6 +849,7 @@ AC_SUBST(LIB_GLIDE)
AC_SUBST(LIB_GNOME) AC_SUBST(LIB_GNOME)
AC_SUBST(LIB_GTK) AC_SUBST(LIB_GTK)
AC_SUBST(LIB_IDCTALTIVEC) AC_SUBST(LIB_IDCTALTIVEC)
AC_SUBST(LIB_LIBDVDCSS)
AC_SUBST(LIB_KDE) AC_SUBST(LIB_KDE)
AC_SUBST(LIB_MACOSX) AC_SUBST(LIB_MACOSX)
AC_SUBST(LIB_QNX) AC_SUBST(LIB_QNX)
......
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
# (c)2001 VideoLAN # (c)2001 VideoLAN
############################################################################### ###############################################################################
-include ../../Makefile.opts
BASE_A := libdvdcss.a BASE_A := libdvdcss.a
BASE_SO := libdvdcss.so BASE_SO := libdvdcss.so
MAJOR_SO := libdvdcss.so.$(shell echo $(LIBDVDCSS_VERSION) | cut -f1 -d.) MAJOR_SO := libdvdcss.so.$(shell echo $(LIBDVDCSS_VERSION) | cut -f1 -d.)
FULL_SO := libdvdcss.so.$(LIBDVDCSS_VERSION) FULL_SO := libdvdcss.so.$(LIBDVDCSS_VERSION)
ifneq (,$(SOFLAGS))
ALL_SOFLAGS := $(SOFLAGS)$(MAJOR_SO)
endif
# #
# Objects # Objects
...@@ -24,7 +25,7 @@ $(LIBDVDCSS_O): %.o: %.c ...@@ -24,7 +25,7 @@ $(LIBDVDCSS_O): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $< $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
../../lib/$(FULL_SO): $(LIBDVDCSS_O) ../../lib/$(FULL_SO): $(LIBDVDCSS_O)
$(CC) $(PCFLAGS) -Wl,-soname -Wl,$(MAJOR_SO) -o $@ $^ $(PLCFLAGS) $(CC) $(PCFLAGS) $(ALL_SOFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_LIBDVDCSS)
rm -f ../../lib/$(BASE_SO) && ln -s $(FULL_SO) ../../lib/$(BASE_SO) rm -f ../../lib/$(BASE_SO) && ln -s $(FULL_SO) ../../lib/$(BASE_SO)
rm -f ../../lib/$(MAJOR_SO) && ln -s $(FULL_SO) ../../lib/$(MAJOR_SO) rm -f ../../lib/$(MAJOR_SO) && ln -s $(FULL_SO) ../../lib/$(MAJOR_SO)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ioctl.c: DVD ioctl replacement function * ioctl.c: DVD ioctl replacement function
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: ioctl.c,v 1.6 2001/08/06 13:28:00 sam Exp $ * $Id: ioctl.c,v 1.7 2001/08/07 02:48:24 sam Exp $
* *
* Authors: Markus Kuespert <ltlBeBoy@beosmail.com> * Authors: Markus Kuespert <ltlBeBoy@beosmail.com>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -48,6 +48,9 @@ ...@@ -48,6 +48,9 @@
#ifdef DVD_STRUCT_IN_LINUX_CDROM_H #ifdef DVD_STRUCT_IN_LINUX_CDROM_H
# include <linux/cdrom.h> # include <linux/cdrom.h>
#endif #endif
#ifdef DVD_STRUCT_IN_DVD_H
# include <dvd.h>
#endif
#ifdef SYS_BEOS #ifdef SYS_BEOS
# include <malloc.h> # include <malloc.h>
# include <scsi.h> # include <scsi.h>
...@@ -84,7 +87,7 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright ) ...@@ -84,7 +87,7 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright )
{ {
int i_ret; int i_ret;
#if defined( DVD_STRUCT_IN_LINUX_CDROM_H ) #if defined( HAVE_LINUX_DVD_STRUCT )
dvd_struct dvd; dvd_struct dvd;
dvd.type = DVD_STRUCT_COPYRIGHT; dvd.type = DVD_STRUCT_COPYRIGHT;
...@@ -190,7 +193,7 @@ int ioctl_ReadKey( int i_fd, int *pi_agid, u8 *p_key ) ...@@ -190,7 +193,7 @@ int ioctl_ReadKey( int i_fd, int *pi_agid, u8 *p_key )
{ {
int i_ret; int i_ret;
#if defined( DVD_STRUCT_IN_LINUX_CDROM_H ) #if defined( HAVE_LINUX_DVD_STRUCT )
dvd_struct dvd; dvd_struct dvd;
dvd.type = DVD_STRUCT_DISCKEY; dvd.type = DVD_STRUCT_DISCKEY;
...@@ -298,7 +301,7 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid ) ...@@ -298,7 +301,7 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid )
{ {
int i_ret; int i_ret;
#if defined( DVD_STRUCT_IN_LINUX_CDROM_H ) #if defined( HAVE_LINUX_DVD_STRUCT )
dvd_authinfo auth_info; dvd_authinfo auth_info;
auth_info.type = DVD_LU_SEND_AGID; auth_info.type = DVD_LU_SEND_AGID;
...@@ -375,7 +378,7 @@ int ioctl_ReportChallenge( int i_fd, int *pi_agid, u8 *p_challenge ) ...@@ -375,7 +378,7 @@ int ioctl_ReportChallenge( int i_fd, int *pi_agid, u8 *p_challenge )
{ {
int i_ret; int i_ret;
#if defined( DVD_STRUCT_IN_LINUX_CDROM_H ) #if defined( HAVE_LINUX_DVD_STRUCT )
dvd_authinfo auth_info; dvd_authinfo auth_info;
auth_info.type = DVD_LU_SEND_CHALLENGE; auth_info.type = DVD_LU_SEND_CHALLENGE;
...@@ -465,7 +468,7 @@ int ioctl_ReportASF( int i_fd, int *pi_agid, int *pi_asf ) ...@@ -465,7 +468,7 @@ int ioctl_ReportASF( int i_fd, int *pi_agid, int *pi_asf )
{ {
int i_ret; int i_ret;
#if defined( DVD_STRUCT_IN_LINUX_CDROM_H ) #if defined( HAVE_LINUX_DVD_STRUCT )
dvd_authinfo auth_info; dvd_authinfo auth_info;
auth_info.type = DVD_LU_SEND_ASF; auth_info.type = DVD_LU_SEND_ASF;
...@@ -559,7 +562,7 @@ int ioctl_ReportKey1( int i_fd, int *pi_agid, u8 *p_key ) ...@@ -559,7 +562,7 @@ int ioctl_ReportKey1( int i_fd, int *pi_agid, u8 *p_key )
{ {
int i_ret; int i_ret;
#if defined( DVD_STRUCT_IN_LINUX_CDROM_H ) #if defined( HAVE_LINUX_DVD_STRUCT )
dvd_authinfo auth_info; dvd_authinfo auth_info;
auth_info.type = DVD_LU_SEND_KEY1; auth_info.type = DVD_LU_SEND_KEY1;
...@@ -643,7 +646,7 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid ) ...@@ -643,7 +646,7 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid )
{ {
int i_ret; int i_ret;
#if defined( DVD_STRUCT_IN_LINUX_CDROM_H ) #if defined( HAVE_LINUX_DVD_STRUCT )
dvd_authinfo auth_info; dvd_authinfo auth_info;
auth_info.type = DVD_INVALIDATE_AGID; auth_info.type = DVD_INVALIDATE_AGID;
...@@ -716,7 +719,7 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid ) ...@@ -716,7 +719,7 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid )
*****************************************************************************/ *****************************************************************************/
int ioctl_SendChallenge( int i_fd, int *pi_agid, u8 *p_challenge ) int ioctl_SendChallenge( int i_fd, int *pi_agid, u8 *p_challenge )
{ {
#if defined( DVD_STRUCT_IN_LINUX_CDROM_H ) #if defined( HAVE_LINUX_DVD_STRUCT )
dvd_authinfo auth_info; dvd_authinfo auth_info;
auth_info.type = DVD_HOST_SEND_CHALLENGE; auth_info.type = DVD_HOST_SEND_CHALLENGE;
...@@ -800,7 +803,7 @@ int ioctl_SendChallenge( int i_fd, int *pi_agid, u8 *p_challenge ) ...@@ -800,7 +803,7 @@ int ioctl_SendChallenge( int i_fd, int *pi_agid, u8 *p_challenge )
*****************************************************************************/ *****************************************************************************/
int ioctl_SendKey2( int i_fd, int *pi_agid, u8 *p_key ) int ioctl_SendKey2( int i_fd, int *pi_agid, u8 *p_key )
{ {
#if defined( DVD_STRUCT_IN_LINUX_CDROM_H ) #if defined( HAVE_LINUX_DVD_STRUCT )
dvd_authinfo auth_info; dvd_authinfo auth_info;
auth_info.type = DVD_HOST_SEND_KEY2; auth_info.type = DVD_HOST_SEND_KEY2;
......
...@@ -82,6 +82,9 @@ ...@@ -82,6 +82,9 @@
/* Define if you have the <dlfcn.h> header file. */ /* Define if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H #undef HAVE_DLFCN_H
/* Define if you have the <dvd.h> header file. */
#undef HAVE_DVD_H
/* Define if you have the <fcntl.h> header file. */ /* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H #undef HAVE_FCNTL_H
...@@ -181,12 +184,18 @@ ...@@ -181,12 +184,18 @@
/* Define if <sys/cdio.h> defines dvd_struct. */ /* Define if <sys/cdio.h> defines dvd_struct. */
#undef DVD_STRUCT_IN_SYS_CDIO_H #undef DVD_STRUCT_IN_SYS_CDIO_H
/* Define if BSD-like dvd_struct is defined. */
#undef HAVE_BSD_DVD_STRUCT
/* Define if <linux/cdrom.h> defines DVD_STRUCT. */ /* Define if <linux/cdrom.h> defines DVD_STRUCT. */
#undef DVD_STRUCT_IN_LINUX_CDROM_H #undef DVD_STRUCT_IN_LINUX_CDROM_H
/* Define if <dvd.h> defines DVD_STRUCT. */
#undef DVD_STRUCT_IN_DVD_H
/* Define if Linux-like dvd_struct is defined. */
#undef HAVE_LINUX_DVD_STRUCT
/* Define if BSD-like dvd_struct is defined. */
#undef HAVE_BSD_DVD_STRUCT
/* Define if <pth.h> defines pth_init */ /* Define if <pth.h> defines pth_init */
#undef PTH_INIT_IN_PTH_H #undef PTH_INIT_IN_PTH_H
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dvd.c : DVD input module for vlc * dvd.c : DVD input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000 VideoLAN
* $Id: dvd.c,v 1.12 2001/08/06 13:28:00 sam Exp $ * $Id: dvd.c,v 1.13 2001/08/07 02:48:25 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -169,6 +169,8 @@ static void ProbeLibDVDCSS( void ) ...@@ -169,6 +169,8 @@ static void ProbeLibDVDCSS( void )
{ {
intf_ErrMsg( "dvd warning: no valid libdvdcss found, " intf_ErrMsg( "dvd warning: no valid libdvdcss found, "
"I will only play unencrypted DVDs" ); "I will only play unencrypted DVDs" );
intf_ErrMsg( "dvd warning: get libdvdcss at "
"http://www.videolan.org/libdvdcss/" );
dvdcss_open = dummy_dvdcss_open; dvdcss_open = dummy_dvdcss_open;
dvdcss_close = dummy_dvdcss_close; dvdcss_close = dummy_dvdcss_close;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ps.c: PS demux and packet management * input_ps.c: PS demux and packet management
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_ps.c,v 1.31 2001/07/31 21:13:30 gbazin Exp $ * $Id: input_ps.c,v 1.32 2001/08/07 02:48:25 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr> * Cyril Deguet <asmax@via.ecp.fr>
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "defs.h" #include "defs.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
...@@ -71,6 +72,19 @@ ...@@ -71,6 +72,19 @@
#include "modules.h" #include "modules.h"
#include "modules_export.h" #include "modules_export.h"
/*****************************************************************************
* fseeko: fseeko replacement for BSDI.
*****************************************************************************/
#ifdef __bsdi__
int __sfseek __P(( FILE *, fpos_t, int ));
fpos_t __sftell __P(( FILE * ));
static __inline__ off_t fseeko( FILE *p_file, off_t i_offset, int i_pos )
{
return __sfseek( p_file, i_offset, i_pos );
}
#endif
/***************************************************************************** /*****************************************************************************
* Local prototypes * Local prototypes
*****************************************************************************/ *****************************************************************************/
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* and spawn threads. * and spawn threads.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: main.c,v 1.110 2001/08/05 15:32:46 gbazin Exp $ * $Id: main.c,v 1.111 2001/08/07 02:48:25 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -1008,7 +1008,11 @@ static void InstructionSignalHandler( int i_signal ) ...@@ -1008,7 +1008,11 @@ static void InstructionSignalHandler( int i_signal )
* to an interface having been destroyed */ * to an interface having been destroyed */
/* Acknowledge the signal received */ /* Acknowledge the signal received */
fprintf( stderr, "illegal instruction : optimization disabled\n" ); fprintf( stderr, "warning: extended instructions unsupported, "
"some optimizations will be disabled\n" );
#ifdef SYS_LINUX
fprintf( stderr, "upgrade to kernel 2.4.x to get rid of this warning\n" );
#endif
i_illegal = 1; i_illegal = 1;
...@@ -1050,7 +1054,7 @@ static int CPUCapabilities( void ) ...@@ -1050,7 +1054,7 @@ static int CPUCapabilities( void )
if( ret != KERN_SUCCESS ) if( ret != KERN_SUCCESS )
{ {
intf_ErrMsg( "error: couldn't get CPU information" ); fprintf( stderr, "error: couldn't get CPU information\n" );
return( i_capabilities ); return( i_capabilities );
} }
...@@ -1198,10 +1202,17 @@ static int RedirectSTDOUT( void ) ...@@ -1198,10 +1202,17 @@ static int RedirectSTDOUT( void )
i_stdout_filedesc = open( psz_stdout_filename, i_stdout_filedesc = open( psz_stdout_filename,
O_CREAT | O_TRUNC | O_RDWR, O_CREAT | O_TRUNC | O_RDWR,
S_IREAD | S_IWRITE ); S_IREAD | S_IWRITE );
if( dup2( i_stdout_filedesc, fileno(stdout) ) == -1 ) if( dup2( i_stdout_filedesc, fileno(stdout) ) == -1 )
intf_ErrMsg("Unable to redirect stdout!\n"); {
intf_ErrMsg( "warning: unable to redirect stdout" );
}
if( dup2( i_stdout_filedesc, fileno(stderr) ) == -1 ) if( dup2( i_stdout_filedesc, fileno(stderr) ) == -1 )
intf_ErrMsg("Unable to redirect stderr!\n"); {
intf_ErrMsg( "warning: unable to redirect stderr" );
}
close( i_stdout_filedesc ); close( i_stdout_filedesc );
} }
else else
......
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