? autom4te.cache
? depcomp
? foo.diff
? stamp-h1
Index: bootstrap
===================================================================
RCS file: /cvsroot/ogle/libdvdread/bootstrap,v
retrieving revision 1.2
diff -u -r1.2 bootstrap
--- bootstrap	2002/08/15 17:40:06	1.2
+++ bootstrap	2002/10/31 16:47:13
@@ -1,11 +1,11 @@
 #! /bin/sh
 set -x
 
-aclocal
+aclocal-1.6
 libtoolize --force --copy
 autoheader
 #add --include-deps if you want to bootstrap with any other compiler than gcc
 #automake --add-missing --copy --include-deps
-automake --add-missing --force --copy
+automake-1.6 --add-missing --force --copy
 autoconf
 rm -f config.cache
Index: configure.in
===================================================================
RCS file: /cvsroot/ogle/libdvdread/configure.in,v
retrieving revision 1.11
diff -u -r1.11 configure.in
--- configure.in	2002/08/15 17:40:07	1.11
+++ configure.in	2002/10/31 16:47:13
@@ -16,6 +16,9 @@
     CFLAGS="${CFLAGS} -no-cpp-precomp"
     AC_DEFINE(__DARWIN__, 1, Have a Mac OS X system)
     ;;
+  x*mingw32* | x*cygwin*)
+    CFLAGS="${CFLAGS} -Dssize_t=long"
+    ;;
   x*)
     ;;
 esac
@@ -41,20 +44,31 @@
 dnl
 dnl We use dlopen for libdvdcss access
 dnl
-AC_CHECK_FUNC(dlopen, 
-  DL_LIBS="", 
-  AC_CHECK_LIB(dl, dlopen, 
-    DL_LIBS=-ldl, 
-    AC_MSG_ERROR(You need libdl (dlopen))
+AC_ARG_ENABLE([dvdcss],
+    [  --enable-dvdcss         force linking against libdvdcss])
+if test x"$enable_dvdcss" = xyes; then
+  AC_CHECK_HEADERS(dvdcss/dvdcss.h,
+    CSS_LIBS=-ldvdcss,
+    AC_MSG_ERROR(You need libdvdcss (dvdcss.h))
+  )
+else
+  AC_CHECK_FUNC(dlopen, 
+    DL_LIBS="", 
+    AC_CHECK_LIB(dl, dlopen, 
+      DL_LIBS=-ldl, 
+      AC_MSG_ERROR(You need libdl (dlopen))
+    )
   )
-)
+fi
 AC_SUBST(DL_LIBS)
+AC_SUBST(CSS_LIBS)
 
-dnl 
-dnl Check for inttype.h, if not present on the system generate one in ".".
+dnl
+dnl AC_CHECK_GENERATE_INTTYPES(include)
 dnl
-AC_CHECK_GENERATE_INTTYPES(.)
 
+dnl Check for inttypes
+AC_CHECK_HEADERS(stdint.h inttypes.h)
 
 AC_C_BIGENDIAN
 AC_C_CONST
Index: dvdread/Makefile.am
===================================================================
RCS file: /cvsroot/ogle/libdvdread/dvdread/Makefile.am,v
retrieving revision 1.9
diff -u -r1.9 Makefile.am
--- dvdread/Makefile.am	2002/07/11 18:07:44	1.9
+++ dvdread/Makefile.am	2002/10/31 16:47:13
@@ -3,7 +3,7 @@
 lib_LTLIBRARIES = libdvdread.la
 libdvdread_la_SOURCES = dvd_input.c dvd_reader.c dvd_udf.c ifo_read.c \
 	ifo_print.c nav_read.c nav_print.c bswap.h dvd_udf.h dvd_input.h
-libdvdread_la_LIBADD = @DL_LIBS@
+libdvdread_la_LIBADD = @DL_LIBS@ @CSS_LIBS@
 libdvdread_la_LDFLAGS = -version-info 2:2:0
 
 pkgincludedir = $(includedir)/dvdread
Index: dvdread/bswap.h
===================================================================
RCS file: /cvsroot/ogle/libdvdread/dvdread/bswap.h,v
retrieving revision 1.7
diff -u -r1.7 bswap.h
--- dvdread/bswap.h	2002/04/07 17:51:47	1.7
+++ dvdread/bswap.h	2002/10/31 16:47:13
@@ -54,7 +54,7 @@
  * functionality! 
  */
 
-#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__)
+#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32)
 #define B2N_16(x) \
  x = ((((x) & 0xff00) >> 8) | \
       (((x) & 0x00ff) << 8))
Index: dvdread/dvd_input.c
===================================================================
RCS file: /cvsroot/ogle/libdvdread/dvdread/dvd_input.c,v
retrieving revision 1.4
diff -u -r1.4 dvd_input.c
--- dvdread/dvd_input.c	2002/08/02 12:09:52	1.4
+++ dvdread/dvd_input.c	2002/10/31 16:47:13
@@ -17,11 +17,12 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <dlfcn.h>
 
 #include "dvd_reader.h"
 #include "dvd_input.h"
@@ -34,7 +35,16 @@
 int         (*DVDinput_read)  (dvd_input_t, void *, int, int);
 char *      (*DVDinput_error) (dvd_input_t);
 
-/* For libdvdcss */
+#ifdef HAVE_DVDCSS_DVDCSS_H
+#   include <dvdcss/dvdcss.h>
+#   define DVDcss_open(a) dvdcss_open((char*)(a))
+#   define DVDcss_close   dvdcss_close
+#   define DVDcss_seek    dvdcss_seek
+#   define DVDcss_title   dvdcss_title
+#   define DVDcss_read    dvdcss_read
+#   define DVDcss_error   dvdcss_error
+#else
+#   include <dlfcn.h>
 typedef struct dvdcss_s *dvdcss_handle;
 
 dvdcss_handle (*DVDcss_open)  (const char *);
@@ -43,7 +53,7 @@
 int           (*DVDcss_title) (dvdcss_handle, int); 
 int           (*DVDcss_read)  (dvdcss_handle, void *, int, int);
 char *        (*DVDcss_error) (dvdcss_handle);
-
+#endif
 
 /* The DVDinput handle, add stuff here for new input methods. */
 struct dvd_input_s {
@@ -72,7 +82,7 @@
   /* Really open it with libdvdcss */
   dev->dvdcss = DVDcss_open(target);
   if(dev->dvdcss == 0) {
-    fprintf(stderr, "libdvdread: Could not open device with libdvdcss.\n");
+    fprintf(stderr, "libdvdread: Could not open %s with libdvdcss.\n", target);
     free(dev);
     return NULL;
   }
@@ -254,7 +264,12 @@
 {
   void *dvdcss_library = NULL;
   char **dvdcss_version = NULL;
-  
+
+#ifdef HAVE_DVDCSS_DVDCSS_H
+  dvdcss_version = &dvdcss_interface_2;
+  dvdcss_library = &dvdcss_library;
+
+#else
   dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY);
   
   if(dvdcss_library != NULL) {
@@ -292,6 +307,7 @@
       dlclose(dvdcss_library);
     }
   }
+#endif /* HAVE_DVDCSS_DVDCSS_H */
   
   if(dvdcss_library != NULL) {
     /*
@@ -303,7 +319,7 @@
     fprintf(stderr, "libdvdread: Using libdvdcss version %s for DVD access\n",
 	    *dvdcss_version);
     
-    /* libdvdcss wraper functions */
+    /* libdvdcss wrapper functions */
     DVDinput_open  = css_open;
     DVDinput_close = css_close;
     DVDinput_seek  = css_seek;
Index: dvdread/dvd_input.h
===================================================================
RCS file: /cvsroot/ogle/libdvdread/dvdread/dvd_input.h,v
retrieving revision 1.4
diff -u -r1.4 dvd_input.h
--- dvdread/dvd_input.h	2002/08/02 12:09:52	1.4
+++ dvdread/dvd_input.h	2002/10/31 16:47:13
@@ -30,7 +30,7 @@
 typedef struct dvd_input_s *dvd_input_t;
 
 /**
- * Pointers which will be filled either the input meathods functions.
+ * Pointers which will be filled either the input methods functions.
  */
 extern dvd_input_t (*DVDinput_open)  (const char *);
 extern int         (*DVDinput_close) (dvd_input_t);
Index: dvdread/dvd_reader.c
===================================================================
RCS file: /cvsroot/ogle/libdvdread/dvdread/dvd_reader.c,v
retrieving revision 1.16
diff -u -r1.16 dvd_reader.c
--- dvdread/dvd_reader.c	2002/07/11 21:40:15	1.16
+++ dvdread/dvd_reader.c	2002/10/31 16:47:13
@@ -17,6 +17,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  */
 
+#include "config.h"
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/time.h> /* For the timing of dvdcss_title crack. */
@@ -83,8 +85,10 @@
 /* Loop over all titles and call dvdcss_title to crack the keys. */
 static int initAllCSSKeys( dvd_reader_t *dvd )
 {
+#ifndef WIN32 /* don't have struct timeval */
     struct timeval all_s, all_e;
     struct timeval t_s, t_e;
+#endif
     char filename[ MAX_UDF_FILE_NAME_LEN ];
     uint32_t start, len;
     int title;
@@ -94,10 +98,14 @@
     fprintf( stderr, "libdvdread: This can take a _long_ time, "
 	     "please be patient\n\n" );
 	
+#ifndef WIN32 /* don't have gettimeofday */
     gettimeofday(&all_s, NULL);
+#endif
 	
     for( title = 0; title < 100; title++ ) {
+#ifndef WIN32
 	gettimeofday( &t_s, NULL );
+#endif
 	if( title == 0 ) {
 	    sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
 	} else {
@@ -111,14 +119,18 @@
 	    if( DVDinput_title( dvd->dev, (int)start ) < 0 ) {
 		fprintf( stderr, "libdvdread: Error cracking CSS key for %s (0x%08x)\n", filename, start);
 	    }
+#ifndef WIN32
 	    gettimeofday( &t_e, NULL );
 	    fprintf( stderr, "libdvdread: Elapsed time %ld\n",  
 		     (long int) t_e.tv_sec - t_s.tv_sec );
+#endif
 	}
 	    
 	if( title == 0 ) continue;
 	    
+#ifndef WIN32
 	gettimeofday( &t_s, NULL );
+#endif
 	sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 1 );
 	start = UDFFindFile( dvd, filename, &len );
 	if( start == 0 || len == 0 ) break;
@@ -129,16 +141,20 @@
 	if( DVDinput_title( dvd->dev, (int)start ) < 0 ) {
 	    fprintf( stderr, "libdvdread: Error cracking CSS key for %s (0x%08x)!!\n", filename, start);
 	}
+#ifndef WIN32
 	gettimeofday( &t_e, NULL );
 	fprintf( stderr, "libdvdread: Elapsed time %ld\n",  
 		 (long int) t_e.tv_sec - t_s.tv_sec );
+#endif
     }
     title--;
     
     fprintf( stderr, "libdvdread: Found %d VTS's\n", title );
+#ifndef WIN32
     gettimeofday(&all_e, NULL);
     fprintf( stderr, "libdvdread: Elapsed time %ld\n",  
 	     (long int) all_e.tv_sec - all_s.tv_sec );
+#endif
     
     return 0;
 }
@@ -281,6 +297,7 @@
 	/* XXX: We should scream real loud here. */
 	if( !(path_copy = strdup( path ) ) ) return 0;
 
+#ifndef WIN32 /* don't have fchdir, and getcwd( NULL, ... ) is strange */
 	/* Resolve any symlinks and get the absolut dir name. */
 	{
 	    char *new_path;
@@ -297,6 +314,7 @@
 		}
 	    }
 	}
+#endif
 	
 	/**
 	 * If we're being asked to open a directory, check if that directory
Index: dvdread/dvd_udf.c
===================================================================
RCS file: /cvsroot/ogle/libdvdread/dvdread/dvd_udf.c,v
retrieving revision 1.8
diff -u -r1.8 dvd_udf.c
--- dvdread/dvd_udf.c	2002/05/25 20:09:10	1.8
+++ dvdread/dvd_udf.c	2002/10/31 16:47:14
@@ -27,15 +27,21 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
  
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
-#include <sys/ioctl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
+
+#if defined(HAVE_INTTYPES_H)
 #include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
 
 #include "dvd_reader.h"
 #include "dvd_udf.h"
Index: dvdread/dvd_udf.h
===================================================================
RCS file: /cvsroot/ogle/libdvdread/dvdread/dvd_udf.h,v
retrieving revision 1.6
diff -u -r1.6 dvd_udf.h
--- dvdread/dvd_udf.h	2002/04/07 17:51:48	1.6
+++ dvdread/dvd_udf.h	2002/10/31 16:47:14
@@ -30,7 +30,11 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
+#if defined(HAVE_INTTYPES_H)
 #include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
 
 #include "dvd_reader.h"
 
Index: dvdread/ifo_print.c
===================================================================
RCS file: /cvsroot/ogle/libdvdread/dvdread/ifo_print.c,v
retrieving revision 1.8
diff -u -r1.8 ifo_print.c
--- dvdread/ifo_print.c	2002/08/18 15:19:51	1.8
+++ dvdread/ifo_print.c	2002/10/31 16:47:14
@@ -17,15 +17,21 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h" // Needed for WORDS_BIGENDIAN
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <inttypes.h>
 #include <string.h>
 #include <ctype.h>
 #include <assert.h>
 
-#include "config.h" // Needed for WORDS_BIGENDIAN
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
 #include "ifo_types.h"
 #include "ifo_read.h"
 #include "ifo_print.h"
Index: dvdread/ifo_read.c
===================================================================
RCS file: /cvsroot/ogle/libdvdread/dvdread/ifo_read.c,v
retrieving revision 1.14
diff -u -r1.14 ifo_read.c
--- dvdread/ifo_read.c	2002/08/18 15:19:51	1.14
+++ dvdread/ifo_read.c	2002/10/31 16:47:14
@@ -17,16 +17,21 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
-
-#include <inttypes.h>
 #include <string.h>
 #include <assert.h>
 
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
 #include "dvd_reader.h"
 
-#include "config.h" // Needed for WORDS_BIGENDIAN
 #include "bswap.h"
 #include "ifo_types.h"
 #include "ifo_read.h"
Index: dvdread/ifo_types.h
===================================================================
RCS file: /cvsroot/ogle/libdvdread/dvdread/ifo_types.h,v
retrieving revision 1.5
diff -u -r1.5 ifo_types.h
--- dvdread/ifo_types.h	2002/08/18 15:19:51	1.5
+++ dvdread/ifo_types.h	2002/10/31 16:47:14
@@ -20,7 +20,12 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#if defined(HAVE_INTTYPES_H)
 #include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
 #include <dvdread/dvd_reader.h>
 
 
Index: dvdread/nav_print.c
===================================================================
RCS file: /cvsroot/ogle/libdvdread/dvdread/nav_print.c,v
retrieving revision 1.3
diff -u -r1.3 nav_print.c
--- dvdread/nav_print.c	2002/04/07 17:18:00	1.3
+++ dvdread/nav_print.c	2002/10/31 16:47:14
@@ -23,11 +23,17 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h" // Needed for WORDS_BIGENDIAN
+
 #include <stdio.h>
-#include <inttypes.h>
 #include <assert.h>
 
-#include "config.h" // Needed for WORDS_BIGENDIAN
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
 #include "nav_types.h"
 #include "nav_print.h"
 
Index: dvdread/nav_read.c
===================================================================
RCS file: /cvsroot/ogle/libdvdread/dvdread/nav_read.c,v
retrieving revision 1.4
diff -u -r1.4 nav_read.c
--- dvdread/nav_read.c	2002/04/07 17:51:48	1.4
+++ dvdread/nav_read.c	2002/10/31 16:47:14
@@ -16,12 +16,18 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h" // Needed for WORDS_BIGENDIAN
+
 #include <stdio.h>
 #include <string.h>
-#include <inttypes.h>
 #include <assert.h>
 
-#include "config.h" // Needed for WORDS_BIGENDIAN
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
 #include "bswap.h"
 #include "nav_types.h"
 #include "nav_read.h"
Index: dvdread/nav_types.h
===================================================================
RCS file: /cvsroot/ogle/libdvdread/dvdread/nav_types.h,v
retrieving revision 1.6
diff -u -r1.6 nav_types.h
--- dvdread/nav_types.h	2002/08/11 16:50:11	1.6
+++ dvdread/nav_types.h	2002/10/31 16:47:15
@@ -29,7 +29,6 @@
  * USA
  */
 
-#include <inttypes.h>
 #include <dvdread/ifo_types.h> /* only dvd_time_t, vm_cmd_t and user_ops_t */
 
 
Index: src/Makefile.am
===================================================================
RCS file: /cvsroot/ogle/libdvdread/src/Makefile.am,v
retrieving revision 1.3
diff -u -r1.3 Makefile.am
--- src/Makefile.am	2002/07/11 18:07:44	1.3
+++ src/Makefile.am	2002/10/31 16:47:15
@@ -1,17 +1,17 @@
 # 
-# There really shouldn't be any need to use @DL_LIBS@ here
-# but old versions of libtool failed to do the correct thing
+# There really shouldn't be any need to use @DL_LIBS@ and @CSS_LIBS@
+# here but old versions of libtool failed to do the correct thing
 
 INCLUDES = -I$(top_srcdir)
 
 noinst_PROGRAMS = ifo_dump play_title title_info
 
 ifo_dump_SOURCES = ifo_dump.c
-ifo_dump_LDADD = $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@
+ifo_dump_LDADD = $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@ @CSS_LIBS@
 
 play_title_SOURCES = play_title.c
-play_title_LDADD = $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@
+play_title_LDADD = $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@ @CSS_LIBS@
 
 title_info_SOURCES = title_info.c
-title_info_LDADD = $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@
+title_info_LDADD = $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@ @CSS_LIBS@
 
Index: src/ifo_dump.c
===================================================================
RCS file: /cvsroot/ogle/libdvdread/src/ifo_dump.c,v
retrieving revision 1.2
diff -u -r1.2 ifo_dump.c
--- src/ifo_dump.c	2002/04/07 17:51:55	1.2
+++ src/ifo_dump.c	2002/10/31 16:47:15
@@ -22,6 +22,8 @@
 #include <stdlib.h>
 #include <unistd.h>
 
+#include "config.h"
+
 #include <dvdread/ifo_print.h>
 
 static char *program_name;
@@ -33,6 +35,7 @@
 
 int main(int argc, char *argv[])
 {
+#ifndef WIN32 /* don't have getopt */
   int c;
   dvd_reader_t *dvd;
   program_name = argv[0];
@@ -59,6 +62,7 @@
   }
 
   ifoPrint( dvd, atoi( argv[ optind + 1 ] ) );
+#endif
 
   return 0;  
 }
