[DVDnav-discuss] r1101 - in trunk/libdvdnav: configure.ac examples/Makefile.am src/Makefile.am src/vm/Makefile.am
nicodvb
subversion at mplayerhq.hu
Sat Jun 14 14:33:22 CEST 2008
Author: nicodvb
Date: Sat Jun 14 14:33:21 2008
New Revision: 1101
Log:
now autotools use dvdread-config, too. Based on a patch by Dan Nicholson
Modified:
trunk/libdvdnav/configure.ac
trunk/libdvdnav/examples/Makefile.am
trunk/libdvdnav/src/Makefile.am
trunk/libdvdnav/src/vm/Makefile.am
Modified: trunk/libdvdnav/configure.ac
==============================================================================
--- trunk/libdvdnav/configure.ac (original)
+++ trunk/libdvdnav/configure.ac Sat Jun 14 14:33:21 2008
@@ -176,6 +176,25 @@ case $host in
esac
dnl ---------------------------------------------
+dnl libdvdread
+dnl ---------------------------------------------
+AC_ARG_WITH([dvdread-config],
+ [AS_HELP_STRING([--with-dvdread-config=PROG],
+ [dvdread-config program to use @<:@default=from PATH@:>@])],
+ [DVDREAD_CONFIG="$withval"],
+ [dnl User didn't specify program, search PATH
+ AC_PATH_PROG([DVDREAD_CONFIG], [dvdread-config], [no])
+ test "x$DVDREAD_CONFIG" = xno && \
+ AC_MSG_ERROR([dvdread-config required to link with libdvdread])
+ ])
+DVDREAD_CFLAGS=`$DVDREAD_CONFIG --cflags` || \
+ AC_MSG_ERROR([Could not get libdvdread CFLAGS from $DVDREAD_CONFIG])
+DVDREAD_LIBS=`$DVDREAD_CONFIG --libs` || \
+ AC_MSG_ERROR([Could not get libdvdread LIBS from $DVDREAD_CONFIG])
+AC_SUBST([DVDREAD_CFLAGS])
+AC_SUBST([DVDREAD_LIBS])
+
+dnl ---------------------------------------------
dnl cflags
dnl ---------------------------------------------
dnl Common cflags for all platforms
Modified: trunk/libdvdnav/examples/Makefile.am
==============================================================================
--- trunk/libdvdnav/examples/Makefile.am (original)
+++ trunk/libdvdnav/examples/Makefile.am Sat Jun 14 14:33:21 2008
@@ -1,14 +1,13 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CPPFLAGS = -DDVDNAV_COMPILE -I$(top_srcdir)/src
+AM_CPPFLAGS = -DDVDNAV_COMPILE $(DVDREAD_CFLAGS) -I$(top_srcdir)/src
DVDNAV_LIB = $(top_builddir)/src/libdvdnav.la
noinst_PROGRAMS = menus
menus_SOURCES = menus.c
-menus_LDFLAGS = -L$(top_srcdir)/src/ -ldvdread
-menus_LDADD = $(DVDNAV_LIB)
+menus_LDADD = $(DVDNAV_LIB) $(DVDREAD_LIBS)
$(DVDNAV_LIB):
@cd $(top_builddir)/src/ && $(MAKE) libdvdnav.la
Modified: trunk/libdvdnav/src/Makefile.am
==============================================================================
--- trunk/libdvdnav/src/Makefile.am (original)
+++ trunk/libdvdnav/src/Makefile.am Sat Jun 14 14:33:21 2008
@@ -4,7 +4,7 @@ SUBDIRS = vm
includedir = ${prefix}/include/dvdnav
-AM_CPPFLAGS = -DDVDNAV_COMPILE $(THREAD_CFLAGS) \
+AM_CPPFLAGS = -DDVDNAV_COMPILE $(THREAD_CFLAGS) $(DVDREAD_CFLAGS) \
-I$(top_srcdir)/src/vm
EXTRA_DIST = README.MAP FELLOWSHIP.map
@@ -16,8 +16,8 @@ libdvdnav_la_SOURCES = dvdnav.c \
searching.c settings.c remap.c \
dvdnav_internal.h read_cache.h remap.h
-libdvdnav_la_LIBADD = $(THREAD_LIBS) \
- $(top_builddir)/src/vm/libdvdvm.la -ldvdread
+libdvdnav_la_LIBADD = $(THREAD_LIBS) $(DVDREAD_LIBS) \
+ $(top_builddir)/src/vm/libdvdvm.la
libdvdnav_la_LDFLAGS = \
-version-info $(DVDNAV_LT_CURRENT):$(DVDNAV_LT_REVISION):$(DVDNAV_LT_AGE) \
Modified: trunk/libdvdnav/src/vm/Makefile.am
==============================================================================
--- trunk/libdvdnav/src/vm/Makefile.am (original)
+++ trunk/libdvdnav/src/vm/Makefile.am Sat Jun 14 14:33:21 2008
@@ -2,7 +2,7 @@ include $(top_srcdir)/misc/Makefile.comm
includedir = ${prefix}/include/dvdnav
-AM_CPPFLAGS = -DDVDNAV_COMPILE $(THREAD_CFLAGS) \
+AM_CPPFLAGS = -DDVDNAV_COMPILE $(THREAD_CFLAGS) $(DVDREAD_CFLAGS) \
-I$(top_srcdir)/src
noinst_LTLIBRARIES = libdvdvm.la
More information about the DVDnav-discuss
mailing list