[DVDnav-discuss] r1094 - in trunk/libdvdnav: Makefile configure2 misc/dvdnav-config2.sh
nicodvb
subversion at mplayerhq.hu
Sun Jun 8 11:25:30 CEST 2008
Author: nicodvb
Date: Sun Jun 8 11:25:29 2008
New Revision: 1094
Log:
completed the removal of dvdread: the new build system uses dvdread-config
Modified:
trunk/libdvdnav/Makefile
trunk/libdvdnav/configure2
trunk/libdvdnav/misc/dvdnav-config2.sh
Modified: trunk/libdvdnav/Makefile
==============================================================================
--- trunk/libdvdnav/Makefile (original)
+++ trunk/libdvdnav/Makefile Sun Jun 8 11:25:29 2008
@@ -23,26 +23,7 @@ CFLAGS += -DHAVE_CONFIG_H -DHAVE_DLFCN_H
L=libdvdnav
MINI_L=libdvdnavmini
-ifeq ($(DVDREAD),internal)
-DVDREAD_L=libdvdread
-DVDREAD_LIB = $(DVDREAD_L).a
-DVDREAD_SHLIB = $(DVDREAD_L).so
-VPATH+= $(SRC_PATH_BARE)/src/libdvdread
-DVDREAD_HEADERS = src/libdvdread/dvd_reader.h \
- src/libdvdread/ifo_print.h \
- src/libdvdread/ifo_read.h \
- src/libdvdread/ifo_types.h \
- src/libdvdread/nav_print.h \
- src/libdvdread/nav_read.h \
- src/libdvdread/dvd_udf.h \
- src/libdvdread/nav_types.h \
- src/libdvdread/bitreader.h
-DVDREAD_SRCS = dvd_input.c dvd_reader.c dvd_udf.c ifo_print.c ifo_read.c \
- md5.c nav_print.c nav_read.c bitreader.c
-CFLAGS += -I$(SRC_PATH)/src/libdvdread
-else
-CFLAGS += -I$(DVDREAD_DIR)
-endif
+CFLAGS += $(DVDREAD_CFLAGS)
LIB = $(L).a
SHLIB = $(L).so
@@ -52,22 +33,19 @@ MINI_SHLIB = $(MINI_L).so
DEPFLAG = -M
OBJS = $(patsubst %.c,%.o, $(SRCS))
-DVDREAD_OBJS = $(patsubst %.c,%.o, $(DVDREAD_SRCS))
SHOBJS = $(patsubst %.c,%.so, $(SRCS))
-DVDREAD_SHOBJS = $(patsubst %.c,%.so, $(DVDREAD_SRCS))
DEPS= ${OBJS:%.o=%.d}
-DVDREAD_DEPS= ${DVDREAD_OBJS:%.o=%.d}
BUILDDEPS = Makefile config.mak
ifeq ($(BUILD_SHARED),yes)
-all: $(SHLIB) $(MINI_SHLIB) $(DVDREAD_SHLIB) dvdnav-config dvdread-config
-install: $(SHLIB) $(DVDREAD_SHLIB) install-shared install-dvdnav-config install-dvdread-config
+all: $(SHLIB) $(MINI_SHLIB) dvdnav-config
+install: $(SHLIB) install-shared install-dvdnav-config
endif
ifeq ($(BUILD_STATIC),yes)
-all: $(LIB) $(DVDREAD_LIB) dvdnav-config dvdread-config
-install: $(LIB) $(DVDREAD_LIB) install-static install-dvdnav-config install-dvdread-config
+all: $(LIB) dvdnav-config
+install: $(LIB) install-static install-dvdnav-config
endif
install: install-headers
@@ -82,7 +60,7 @@ endif
version.h:
sh $(SRC_PATH)/version.sh $(SRC_PATH) "$(SHLIB_VERSION)"
-$(SRCS) $(DVDREAD_SRCS): version.h
+$(SRCS): version.h
# General targets
@@ -93,25 +71,11 @@ $(.OBJDIR):
${LIB}: version.h $(.OBJDIR) $(OBJS) $(BUILDDEPS)
cd $(.OBJDIR) && $(AR) rc $@ $(OBJS)
cd $(.OBJDIR) && $(RANLIB) $@
-ifeq ($(DVDREAD),internal)
-${DVDREAD_LIB}: version.h $(.OBJDIR) $(DVDREAD_OBJS) $(BUILDDEPS)
- cd $(.OBJDIR) && $(AR) rc $@ $(DVDREAD_OBJS)
- cd $(.OBJDIR) && $(RANLIB) $@
-endif
-ifeq ($(DVDREAD),internal)
-${SHLIB}: version.h $(.OBJDIR) $(SHOBJS) $(BUILDDEPS) $(DVDREAD_SHLIB)
- cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) -L. -Wl,-soname=$(SHLIB).$(SHLIB_MAJOR) -o $@ $(SHOBJS) -ldvdread $(THREADLIB)
-else
${SHLIB}: version.h $(.OBJDIR) $(SHOBJS) $(BUILDDEPS)
- cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) -Wl,-soname=$(SHLIB).$(SHLIB_MAJOR) -o $@ $(SHOBJS) -ldvdread $(THREADLIB)
-endif
+ cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) -Wl,-soname=$(SHLIB).$(SHLIB_MAJOR) -o $@ $(SHOBJS) $(DVDREAD_LIBS) $(THREADLIB)
${MINI_SHLIB}: version.h $(.OBJDIR) $(SHOBJS) $(BUILDDEPS)
cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) -Wl,-soname=$(MINI_SHLIB).$(SHLIB_MAJOR) -o $@ $(SHOBJS) $(THREADLIB)
-ifeq ($(DVDREAD),internal)
-${DVDREAD_SHLIB}: version.h $(.OBJDIR) $(DVDREAD_SHOBJS) $(BUILDDEPS)
- cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) -ldl -Wl,-soname=$(DVDREAD_SHLIB).$(SHLIB_MAJOR) -o $@ $(DVDREAD_SHOBJS)
-endif
.c.so: $(BUILDDEPS)
cd $(.OBJDIR) && $(CC) -fPIC -DPIC -MD $(CFLAGS) -c -o $@ $<
@@ -125,10 +89,6 @@ endif
install-headers:
install -d $(DESTDIR)$(incdir)
install -m 644 $(HEADERS) $(DESTDIR)$(incdir)
-ifeq ($(DVDREAD),internal)
- install -d $(DESTDIR)$(dvdread_incdir)
- install -m 644 $(DVDREAD_HEADERS) $(DESTDIR)$(dvdread_incdir)
-endif
install-shared: $(SHLIB)
install -d $(DESTDIR)$(shlibdir)
@@ -147,22 +107,11 @@ install-shared: $(SHLIB)
cd $(DESTDIR)$(shlibdir) && \
ln -sf $(MINI_SHLIB).$(SHLIB_MAJOR) $(MINI_SHLIB)
-ifeq ($(DVDREAD),internal)
- install $(INSTALLSTRIP) -m 755 $(.OBJDIR)/$(DVDREAD_SHLIB) \
- $(DESTDIR)$(shlibdir)/$(DVDREAD_SHLIB).$(SHLIB_VERSION)
- cd $(DESTDIR)$(shlibdir) && \
- ln -sf $(DVDREAD_SHLIB).$(SHLIB_VERSION) $(DVDREAD_SHLIB).$(SHLIB_MAJOR)
- cd $(DESTDIR)$(shlibdir) && \
- ln -sf $(DVDREAD_SHLIB).$(SHLIB_MAJOR) $(DVDREAD_SHLIB)
-endif
install-static: $(LIB)
install -d $(DESTDIR)$(libdir)
install $(INSTALLSTRIP) -m 755 $(.OBJDIR)/$(LIB) $(DESTDIR)$(libdir)/$(LIB)
-ifeq ($(DVDREAD),internal)
- install $(INSTALLSTRIP) -m 755 $(.OBJDIR)/$(DVDREAD_LIB) $(DESTDIR)$(libdir)/$(DVDREAD_LIB)
-endif
# Clean targets
@@ -180,8 +129,8 @@ dvdnav-config: $(.OBJDIR)
@echo 'prefix='$(PREFIX) >> $(.OBJDIR)/dvdnav-config
@echo 'libdir='$(shlibdir) >> $(.OBJDIR)/dvdnav-config
@echo 'version='$(SHLIB_VERSION) >> $(.OBJDIR)/dvdnav-config
- @echo 'dvdread='$(DVDREAD) >> $(.OBJDIR)/dvdnav-config
- @echo 'dvdreaddir='$(DVDREAD_DIR) >> $(.OBJDIR)/dvdnav-config
+ @echo 'dvdread_cflags="'$(DVDREAD_CFLAGS)'"' >> $(.OBJDIR)/dvdnav-config
+ @echo 'dvdread_libs="'$(DVDREAD_LIBS)'"' >> $(.OBJDIR)/dvdnav-config
@echo 'threadlib='$(THREADLIB) >> $(.OBJDIR)/dvdnav-config
@echo >> $(.OBJDIR)/dvdnav-config
cat $(SRC_PATH_BARE)/misc/dvdnav-config2.sh >> $(.OBJDIR)/dvdnav-config
@@ -191,18 +140,6 @@ install-dvdnav-config: dvdnav-config
install -d $(DESTDIR)$(PREFIX)/bin
install -m 0755 $(.OBJDIR)/dvdnav-config $(DESTDIR)$(PREFIX)/bin/dvdnav-config
-dvdread-config: $(.OBJDIR)
- @echo '#!/bin/sh' > $(.OBJDIR)/dvdread-config
- @echo 'prefix='$(PREFIX) >> $(.OBJDIR)/dvdread-config
- @echo 'libdir='$(shlibdir) >> $(.OBJDIR)/dvdread-config
- @echo 'version='$(SHLIB_VERSION) >> $(.OBJDIR)/dvdread-config
- @echo >> $(.OBJDIR)/dvdread-config
- cat $(SRC_PATH_BARE)/misc/dvdread-config.sh >> $(.OBJDIR)/dvdread-config
- chmod 0755 $(.OBJDIR)/dvdread-config
-
-install-dvdread-config: dvdread-config
- install -d $(DESTDIR)$(PREFIX)/bin
- install -m 0755 $(.OBJDIR)/dvdread-config $(DESTDIR)$(PREFIX)/bin/dvdread-config
vpath %.so ${.OBJDIR}
vpath %.o ${.OBJDIR}
Modified: trunk/libdvdnav/configure2
==============================================================================
--- trunk/libdvdnav/configure2 (original)
+++ trunk/libdvdnav/configure2 Sun Jun 8 11:25:29 2008
@@ -48,8 +48,7 @@ show_help(){
SHARED=yes
STATIC=yes
-DVDREAD=internal
-dvdread_dir=src/libdvdread/
+DVDREAD_CONFIG=dvdread-config
PREFIX=/usr/local/
INSTALLSTRIP=-s
USEDEBUG=-g
@@ -67,7 +66,7 @@ for opt do
;;
--disable-static) STATIC=no
;;
- --with-dvdread=*) DVDREAD="$optval"
+ --with-dvdread-config=*) DVDREAD_CONFIG="$optval"
;;
--prefix=*) PREFIX="$optval"
;;
@@ -102,16 +101,15 @@ PREFIX=`cd $PREFIX && pwd`
test -z "$libdir" && libdir=$PREFIX/lib
test -z "$shlibdir" && shlibdir=$PREFIX/lib
-test -z "$incdir" && incdir=$PREFIX/include/dvdnav && dvdread_incdir=$PREFIX/include/libdvdread
+test -z "$incdir" && incdir=$PREFIX/include/dvdnav
-if [ "$DVDREAD" != "internal" ] ; then
- if [ -d "$DVDREAD" -a -f "$DVDREAD/dvd_reader.h" ] ; then
- dvdread_dir="$DVDREAD"
- DVDREAD=external
- else
- DVDREAD=internal
- fi
+DVDREAD=`$DVDREAD_CONFIG --prefix`
+if test -z "$DVDREAD" ; then
+ echo "dvdread-config --prefix returned an error. Can't proceed"
+ exit 1
fi
+dvdread_cflags=`$DVDREAD_CONFIG --cflags`
+dvdread_libs=`$DVDREAD_CONFIG --libs`
targetos=`uname -s`
@@ -130,7 +128,6 @@ PREFIX=$PREFIX
libdir=$libdir
shlibdir=$shlibdir
incdir=$incdir
-dvdread_incdir=$dvdread_incdir
THREADLIB=$threadlib
BUILD_SHARED=$SHARED
BUILD_STATIC=$STATIC
@@ -143,8 +140,8 @@ LDFLAGS=$ldflags
SHLDFLAGS=$SHLDFLAGS
INSTALLSTRIP=$INSTALLSTRIP
USEDEBUG=$USEDEBUG
-DVDREAD=$DVDREAD
-DVDREAD_DIR=$dvdread_dir
+DVDREAD_CFLAGS=$dvdread_cflags
+DVDREAD_LIBS=$dvdread_libs
SRC_PATH="$source_path"
SRC_PATH_BARE=$source_path
Modified: trunk/libdvdnav/misc/dvdnav-config2.sh
==============================================================================
--- trunk/libdvdnav/misc/dvdnav-config2.sh (original)
+++ trunk/libdvdnav/misc/dvdnav-config2.sh Sun Jun 8 11:25:29 2008
@@ -1,10 +1,4 @@
-dvdreadlib="-ldvdread"
-dvdreadmsg="[--minilibs]"
-if test "$dvdread" = "external"; then
- dvdreadmsg="[--minicflags]"
- dvdreadcflags="-I$dvdreaddir"
extracflags="-DDVDNAV_USES_EXTERNAL_DVDREAD"
-fi
usage()
{
@@ -15,7 +9,8 @@ Options:
[--version]
[--libs]
[--cflags]
- $dvdreadmsg
+ [--minilibs]
+ [--minicflags]
EOF
exit $1
}
@@ -41,11 +36,7 @@ while test $# -gt 0; do
echo_cflags=yes
;;
--minicflags)
- if test "$dvdread" = "external"; then
echo_minicflags=yes
- else
- usage 1 1>&2
- fi
;;
--libs)
echo_libs=yes
@@ -65,7 +56,7 @@ if test "$echo_prefix" = "yes"; then
fi
if test "$echo_cflags" = "yes"; then
- echo -I$prefix/include $dvdreadcflags $extracflags $threadcflags
+ echo -I$prefix/include $dvdread_cflags $extracflags $threadcflags
fi
if test "$echo_minicflags" = "yes"; then
@@ -73,7 +64,7 @@ if test "$echo_minicflags" = "yes"; then
fi
if test "$echo_libs" = "yes"; then
- echo -L$libdir -ldvdnav $dvdreadlib $threadlib
+ echo -L$libdir -ldvdnav $dvdread_libs $threadlib
fi
if test "$echo_minilibs" = "yes"; then
More information about the DVDnav-discuss
mailing list