[DVDnav-discuss] r910 - in trunk/libdvdnav: misc/dvdnav-config2.sh src/dvdnav.h

nicodvb subversion at mplayerhq.hu
Sat Apr 28 11:27:27 CEST 2007


Author: nicodvb
Date: Sat Apr 28 11:27:27 2007
New Revision: 910

Log:
when compiling against external dvdread add a compile time macro to
identify the case (by means of dvdnav-config --cflags) and include
the correct headers in dvdnav.h


Modified:
   trunk/libdvdnav/misc/dvdnav-config2.sh
   trunk/libdvdnav/src/dvdnav.h

Modified: trunk/libdvdnav/misc/dvdnav-config2.sh
==============================================================================
--- trunk/libdvdnav/misc/dvdnav-config2.sh	(original)
+++ trunk/libdvdnav/misc/dvdnav-config2.sh	Sat Apr 28 11:27:27 2007
@@ -2,6 +2,7 @@ if test "$dvdread" = "external"; then
     dvdreadlib="-ldvdread"
     dvdreadmsg="[--minilibs --minicflags]"
     dvdreadcflags="-I$dvdreaddir"
+    extracflags="-DDVDNAV_USES_EXTERNAL_DVDREAD"
 fi
 
 usage()
@@ -67,11 +68,11 @@ if test "$echo_prefix" = "yes"; then
 fi
 
 if test "$echo_cflags" = "yes"; then
-      echo -I$prefix/include -I$prefix/include/dvdnav $dvdreadcflags $threadcflags
+      echo -I$prefix/include -I$prefix/include/dvdnav $dvdreadcflags $extracflags $threadcflags
 fi
 
 if test "$echo_minicflags" = "yes"; then
-      echo -I$prefix/include -I$prefix/include/dvdnav $threadcflags
+      echo -I$prefix/include -I$prefix/include/dvdnav $extracflags $threadcflags
 fi
 
 if test "$echo_libs" = "yes"; then

Modified: trunk/libdvdnav/src/dvdnav.h
==============================================================================
--- trunk/libdvdnav/src/dvdnav.h	(original)
+++ trunk/libdvdnav/src/dvdnav.h	Sat Apr 28 11:27:27 2007
@@ -37,9 +37,15 @@ extern "C" {
 
 #ifndef DVDNAV_COMPILE
 #  include <dvdnav/dvd_types.h>
+#ifdef DVDNAV_USES_EXTERNAL_DVDREAD
+#  include <dvdread/dvd_reader.h>
+#  include <dvdread/nav_types.h>
+#  include <dvdread/ifo_types.h> /* For vm_cmd_t */
+#else
 #  include <dvdnav/dvd_reader.h>
 #  include <dvdnav/nav_types.h>
 #  include <dvdnav/ifo_types.h> /* For vm_cmd_t */
+#endif
 #  include <dvdnav/dvdnav_events.h>
 #endif
 



More information about the DVDnav-discuss mailing list