diff -ru libdvdnav-0.1.10/configure.ac libdvdnav/configure.ac
--- libdvdnav-0.1.10/configure.ac	2004-06-10 23:13:02.000000000 +0200
+++ libdvdnav/configure.ac	2005-08-31 19:56:21.000000000 +0200
@@ -8,7 +8,7 @@
 dnl --------------------------------------------------------------
 dnl Require autoconf version 2.53
 dnl --------------------------------------------------------------
-AC_PREREQ(2.53)
+AC_PREREQ(2.52)
 
 dnl --------------------------------------------------------------
 dnl Making releases: DVDNAV_SUB += 1; change LT_* accordingly
@@ -113,6 +113,8 @@
 fi
 AC_SUBST(STATIC)
 
+
+
 dnl --------------------------------------------------------------
 dnl Checks for header files.
 dnl --------------------------------------------------------------
@@ -139,7 +141,7 @@
     THREAD_CFLAGS="-I/usr/local/include -D_THREAD_SAFE"
     CFLAGS="$THREAD_CFLAGS $CFLAGS"
     ;;
-  *mingw32* | *cygwin*)
+  *mingw32* | *cygwin* | *beos*)
     ;;
   *)
     AC_CHECK_LIB(pthread, pthread_create,
@@ -150,26 +152,63 @@
 AC_SUBST(THREAD_LIBS)
 AC_SUBST(THREAD_CFLAGS)
 
+link_dvdcss=no
+dvdcss_path=""
 dnl ---------------------------------------------
-dnl dynamic linker
+dnl dvdcss checking
 dnl ---------------------------------------------
-case $host in
-  *mingw32*)
-    CFLAGS="-idirafter \$(top_srcdir)/msvc/include $CFLAGS"
-    LDFLAGS="-no-undefined $LDFLAGS"
-    ;;
-  *cygwin*)
-    LDFLAGS="-no-undefined $LDFLAGS"
-    ;;
-  *)
-    AC_CHECK_LIB(c, dlopen,
-	         DYNAMIC_LD_LIBS="",
-	         AC_CHECK_LIB(dl, dlopen,
-             	              DYNAMIC_LD_LIBS="-ldl",
-	                      AC_MSG_ERROR(dynamic linker needed)))
-    AC_SUBST(DYNAMIC_LD_LIBS)
-    ;;
-esac
+AC_ARG_WITH( [libdvdcss],
+    [ --with-libdvdcss[=PATH]    force linking against libdvdcss],
+    [if test x"$withval" != xno; then
+       link_dvdcss=yes
+     fi
+     if test x"$withval" != xyes; then
+       dvdcss_path=$withval
+     fi])
+
+if test x"$link_dvdcss" != xyes; then
+dnl dlopen libdvdcss
+  AC_CHECK_FUNC( dlopen,
+    [DL_LIBS="" ].
+    AC_CHECK_LIB( dl, dlopen,
+      [DL_LIBS=-ld ],
+      AC_MSG_ERROR(You need libdl (dlopen))
+    )
+  )
+else
+dnl link with libdvdcss
+  if test -z "$dvdcss_path"; then
+    AC_CHECK_LIB(dvdcss, dvdcss_interface_2,
+      [ CSS_LIBS=-ldvdcss ],
+      AC_MSG_ERROR(You need libdvdcss.so.2 or later)
+    )
+    AC_CHECK_HEADERS(dvdcss/dvdcss.h,
+      [ ],
+      AC_MSG_ERROR(You need libdvdcss (dvdcss.h))
+    )
+  else
+    saved_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -L$dvdcss_path/lib"
+    AC_CHECK_LIB(dvdcss, dvdcss_interface_2,
+      [ CSS_LIBS="-L$dvdcss_path/lib -R$dvdcss_path/lib -ldvdcss"
+        CSS_CFLAGS=-I$dvdcss_path/include ],
+      AC_MSG_ERROR(You need libdvdcss.so.2 or later)
+    )
+    CFLAGS=$saved_CFLAGS
+    dnl -w added to shutup GCC3.1's cpp warning about -I/usr/local
+    saved_CPPFLAGS=$CPPFLAGS
+    CPPFLAGS="-w $CPPFLAGS -I$dvdcss_path/include"
+    AC_CHECK_HEADERS(dvdcss/dvdcss.h,
+      [ ],
+      AC_MSG_ERROR(You need libdvdcss (dvdcss.h))
+    )
+    CPPFLAGS=$saved_CPPFLAGS
+  fi
+fi
+
+AC_SUBST(DL_LIBS)
+AC_SUBST(CSS_LIBS)
+AC_SUBST(CSS_CFLAGS)
 
 dnl ---------------------------------------------
 dnl cflags
diff -ru libdvdnav-0.1.10/examples/Makefile.am libdvdnav/examples/Makefile.am
--- libdvdnav-0.1.10/examples/Makefile.am	2004-01-11 22:43:12.000000000 +0100
+++ libdvdnav/examples/Makefile.am	2005-08-31 19:56:21.000000000 +0200
@@ -7,7 +7,7 @@
 noinst_PROGRAMS = menus
 
 menus_SOURCES = menus.c
-menus_LDFLAGS = -L$(top_srcdir)/src/
+menus_LDFLAGS = -L$(top_srcdir)/src/ $(CSS_LIBS)
 menus_LDADD   = $(DVDNAV_LIB)
 
 $(DVDNAV_LIB):
diff -ru libdvdnav-0.1.10/src/dvdnav_internal.h libdvdnav/src/dvdnav_internal.h
--- libdvdnav-0.1.10/src/dvdnav_internal.h	2004-02-13 20:16:17.000000000 +0100
+++ libdvdnav/src/dvdnav_internal.h	2005-08-31 19:56:21.000000000 +0200
@@ -58,6 +58,15 @@
 #include <io.h> /* read() */
 #define lseek64 _lseeki64
 
+#elif defined(__BEOS__)
+
+#include <OS.h>
+typedef sem_id pthread_mutex_t;
+#define pthread_mutex_init(a, b) (*a) = create_sem( 1,"" )
+#define pthread_mutex_lock(a)    acquire_sem( *a )
+#define pthread_mutex_unlock(a)  release_sem( *a )
+#define pthread_mutex_destroy(a) delete_sem( *a )
+
 #else
 
 #include <pthread.h>
diff -ru libdvdnav-0.1.10/src/dvdread/bswap.h libdvdnav/src/dvdread/bswap.h
--- libdvdnav-0.1.10/src/dvdread/bswap.h	2004-01-11 22:43:13.000000000 +0100
+++ libdvdnav/src/dvdread/bswap.h	2005-08-31 19:56:21.000000000 +0200
@@ -65,7 +65,7 @@
  * functionality! 
  */
 
-#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32) || defined(__CYGWIN__)
+#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32) || defined(__CYGWIN__) || defined(__BEOS__)
 #define B2N_16(x) \
  x = ((((x) & 0xff00) >> 8) | \
       (((x) & 0x00ff) << 8))
diff -ru libdvdnav-0.1.10/src/dvdread/dvd_input.h libdvdnav/src/dvdread/dvd_input.h
--- libdvdnav-0.1.10/src/dvdread/dvd_input.h	2004-01-11 22:43:13.000000000 +0100
+++ libdvdnav/src/dvdread/dvd_input.h	2005-08-31 19:56:21.000000000 +0200
@@ -20,6 +20,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  */
 
+#define dvdinput_setup dvdnav_dvdinput_setup
+
 /**
  * Defines and flags.  Make sure they fit the libdvdcss API!
  */
diff -ru libdvdnav-0.1.10/src/dvdread/dvd_reader.c libdvdnav/src/dvdread/dvd_reader.c
--- libdvdnav-0.1.10/src/dvdread/dvd_reader.c	2004-03-03 17:48:36.000000000 +0100
+++ libdvdnav/src/dvdread/dvd_reader.c	2005-08-31 19:58:34.000000000 +0200
@@ -346,9 +346,7 @@
 	}
 #endif
     
-    ret = stat( path, &fileinfo );
-
-    if( ret < 0 ) {
+    if( *path && (ret = stat( path, &fileinfo )) < 0 ) {
 
         /* maybe "host:port" url? try opening it with acCeSS library */
         if( strchr(path,':') ) {
@@ -365,7 +363,7 @@
     }
 
     /* First check if this is a block/char device or a file*/
-    if( S_ISBLK( fileinfo.st_mode ) || 
+    if( !*path || S_ISBLK( fileinfo.st_mode ) || 
 	S_ISCHR( fileinfo.st_mode ) || 
 	S_ISREG( fileinfo.st_mode ) ) {
 
@@ -403,14 +401,16 @@
 
 	/* Resolve any symlinks and get the absolut dir name. */
 	{
+	    char *current_path;
 	    char *new_path;
-	    int cdir = open( ".", O_RDONLY );
 	    
-	    if( cdir >= 0 ) {
+	    current_path = getcwd( NULL, PATH_MAX );
+	    if( current_path ) {
 		chdir( path_copy );
 		new_path = getcwd( NULL, PATH_MAX );
-		fchdir( cdir );
-		close( cdir );
+		chdir( current_path );
+		free( current_path );
+
 		if( new_path ) {
 		    free( path_copy );
 		    path_copy = new_path;
@@ -585,10 +585,12 @@
             sprintf( filename, "%s%s%s", path,
                      ( ( path[ strlen( path ) - 1 ] == '/' ) ? "" : "/" ),
                      ent->d_name );
+            closedir( dir );
             return 0;
         }
     }
 
+    closedir( dir );
     return -1;
 }
 
diff -ru libdvdnav-0.1.10/src/dvdread/dvd_reader.h libdvdnav/src/dvdread/dvd_reader.h
--- libdvdnav-0.1.10/src/dvdread/dvd_reader.h	2004-02-01 18:55:19.000000000 +0100
+++ libdvdnav/src/dvdread/dvd_reader.h	2005-08-31 19:56:21.000000000 +0200
@@ -21,6 +21,20 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#define UDFReadBlocksRaw    dvdnav_UDFReadBlocksRaw
+#define DVDUDFCacheLevel    dvdnav_DVDUDFCacheLevel
+#define DVDOpen             dvdnav_DVDOpen
+#define DVDClose            dvdnav_DVDClose
+#define DVDOpenFile         dvdnav_DVDOpenFile
+#define DVDCloseFile        dvdnav_DVDCloseFile
+#define DVDReadBlocks       dvdnav_DVDReadBlocks
+#define DVDFileSeek         dvdnav_DVDFileSeek
+#define DVDReadBytes        dvdnav_DVDReadBytes
+#define DVDFileSize         dvdnav_DVDFileSize
+#define DVDDiscID           dvdnav_DVDDiscID
+#define DVDISOVolumeInfo    dvdnav_DVDISOVolumeInfo
+#define DVDUDFVolumeInfo    dvdnav_DVDUDFVolumeInfo
+
 #ifdef _MSC_VER
 #include <config.h>
 
diff -ru libdvdnav-0.1.10/src/dvdread/dvd_udf.h libdvdnav/src/dvdread/dvd_udf.h
--- libdvdnav-0.1.10/src/dvdread/dvd_udf.h	2004-01-11 22:43:13.000000000 +0100
+++ libdvdnav/src/dvdread/dvd_udf.h	2005-08-31 19:56:21.000000000 +0200
@@ -31,6 +31,13 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
+#define GetUDFCacheHandle           dvdnav_GetUDFCacheHandle
+#define SetUDFCacheHandle           dvdnav_SetUDFCacheHandle
+#define FreeUDFCache                dvdnav_FreeUDFCache
+#define UDFFindFile                 dvdnav_UDFFindFile
+#define UDFGetVolumeIdentifier      dvdnav_UDFGetVolumeIdentifier
+#define UDFGetVolumeSetIdentifier   dvdnav_UDFGetVolumeSetIdentifier
+
 #include <inttypes.h>
 
 #include "dvd_reader.h"
diff -ru libdvdnav-0.1.10/src/dvdread/ifo_print.h libdvdnav/src/dvdread/ifo_print.h
--- libdvdnav-0.1.10/src/dvdread/ifo_print.h	2004-01-11 22:43:13.000000000 +0100
+++ libdvdnav/src/dvdread/ifo_print.h	2005-08-31 19:56:21.000000000 +0200
@@ -20,6 +20,21 @@
 #ifndef IFO_PRINT_H_INCLUDED
 #define IFO_PRINT_H_INCLUDED
 
+#define ifo_print_VMGI_MAT      dvdnav_ifo_print_VMGI_MAT
+#define ifo_print_VTSI_MAT      dvdnav_ifo_print_VTSI_MAT
+#define ifo_print_PGC           dvdnav_ifo_print_PGC
+#define ifo_print_TT_SRPT       dvdnav_ifo_print_TT_SRPT
+#define ifo_print_VTS_PTT_SRPT  dvdnav_ifo_print_VTS_PTT_SRPT
+#define ifo_print_PTL_MAIT      dvdnav_ifo_print_PTL_MAIT
+#define ifo_print_VTS_TMAPT     dvdnav_ifo_print_VTS_TMAPT
+#define ifo_print_C_ADT         dvdnav_ifo_print_C_ADT
+#define ifo_print_VOBU_ADMAP    dvdnav_ifo_print_VOBU_ADMAP
+#define ifo_print_menu_name     dvdnav_ifo_print_menu_name
+#define ifo_print_PGCIT         dvdnav_ifo_print_PGCIT
+#define ifo_print_PGCI_UT       dvdnav_ifo_print_PGCI_UT
+#define ifo_print_VTS_ATRT      dvdnav_ifo_print_VTS_ATRT
+#define ifo_print               dvdnav_ifo_print
+
 #include <inttypes.h>
 #ifdef DVDNAV_COMPILE
 #  include "ifo_types.h"
diff -ru libdvdnav-0.1.10/src/dvdread/ifo_read.h libdvdnav/src/dvdread/ifo_read.h
--- libdvdnav-0.1.10/src/dvdread/ifo_read.h	2004-01-11 22:43:13.000000000 +0100
+++ libdvdnav/src/dvdread/ifo_read.h	2005-08-31 19:56:21.000000000 +0200
@@ -20,6 +20,37 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#define ifoOpen                     dvdnav_ifoOpen
+#define ifoOpenVMGI                 dvdnav_ifoOpenVMGI
+#define ifoOpenVTSI                 dvdnav_ifoOpenVTSI
+#define ifoClose                    dvdnav_ifoClose
+#define ifoRead_FP_PGC              dvdnav_ifoRead_FP_PGC
+#define ifoFree_FP_PGC              dvdnav_ifoFree_FP_PGC
+#define ifoRead_TT_SRPT             dvdnav_ifoRead_TT_SRPT
+#define ifoFree_TT_SRPT             dvdnav_ifoFree_TT_SRPT
+#define ifoRead_VTS_PTT_SRPT        dvdnav_ifoRead_VTS_PTT_SRPT
+#define ifoFree_VTS_PTT_SRPT        dvdnav_ifoFree_VTS_PTT_SRPT
+#define ifoRead_PTL_MAIT            dvdnav_ifoRead_PTL_MAIT
+#define ifoFree_PTL_MAIT            dvdnav_ifoFree_PTL_MAIT
+#define ifoRead_VTS_TMAPT           dvdnav_ifoRead_VTS_TMAPT
+#define ifoFree_VTS_TMAPT           dvdnav_ifoFree_VTS_TMAPT
+#define ifoRead_TITLE_C_ADT         dvdnav_ifoRead_TITLE_C_ADT
+#define ifoRead_C_ADT               dvdnav_ifoRead_C_ADT
+#define ifoFree_C_ADT               dvdnav_ifoFree_C_ADT
+#define ifoFree_TITLE_C_ADT         dvdnav_ifoFree_TITLE_C_ADT
+#define ifoRead_TITLE_VOBU_ADMAP    dvdnav_ifoRead_TITLE_VOBU_ADMAP
+#define ifoRead_VOBU_ADMAP          dvdnav_ifoRead_VOBU_ADMAP
+#define ifoFree_VOBU_ADMAP          dvdnav_ifoFree_VOBU_ADMAP
+#define ifoFree_TITLE_VOBU_ADMAP    dvdnav_ifoFree_TITLE_VOBU_ADMAP
+#define ifoRead_PGCIT               dvdnav_ifoRead_PGCIT
+#define ifoFree_PGCIT               dvdnav_ifoFree_PGCIT
+#define ifoRead_PGCI_UT             dvdnav_ifoRead_PGCI_UT
+#define ifoFree_PGCI_UT             dvdnav_ifoFree_PGCI_UT
+#define ifoRead_VTS_ATRT            dvdnav_ifoRead_VTS_ATRT
+#define ifoFree_VTS_ATRT            dvdnav_ifoFree_VTS_ATRT
+#define ifoRead_TXTDT_MGI           dvdnav_ifoRead_TXTDT_MGI
+#define ifoFree_TXTDT_MGI           dvdnav_ifoFree_TXTDT_MGI
+
 #include "ifo_types.h"
 #include "dvd_reader.h"
 
diff -ru libdvdnav-0.1.10/src/dvdread/md5.h libdvdnav/src/dvdread/md5.h
--- libdvdnav-0.1.10/src/dvdread/md5.h	2004-01-11 22:43:13.000000000 +0100
+++ libdvdnav/src/dvdread/md5.h	2005-08-31 19:56:21.000000000 +0200
@@ -21,6 +21,14 @@
 #ifndef _MD5_H
 #define _MD5_H 1
 
+#define md5_init_ctx      dvdnav_md5_init_ctx
+#define md5_read_ctx      dvdnav_md5_read_ctx
+#define md5_finish_ctx    dvdnav_md5_finish_ctx
+#define md5_stream        dvdnav_md5_stream
+#define md5_buffer        dvdnav_md5_buffer
+#define md5_process_block dvdnav_md5_process_block
+#define md5_process_bytes dvdnav_md5_process_bytes
+
 #include <stdio.h>
 
 #if defined HAVE_LIMITS_H || _LIBC
