DESTDIR and SDL patches

Arkadiusz Miskiewicz misiek at pld.ORG.PL
Sun Feb 18 13:16:35 CET 2001


Hi,

Two little patches. Please apply them to CVS.
BTW Is there chance to see ggi plugin ported to new API ?

SDL is in most cases used by XFree applications, so it usually
lives in /usr/X11R6/lib. We add -L/usr/X11R6/lib to link SDL plugin
properly.

diff -urN vlc-0.2.61.org/configure.in vlc-0.2.61/configure.in
--- vlc-0.2.61.org/configure.in	Sun Feb 18 12:34:33 2001
+++ vlc-0.2.61/configure.in	Sun Feb 18 13:03:48 2001
@@ -168,12 +168,12 @@
     then
       LIB_SDL="-l"$withval
     else
-      LIB_SDL="-lSDL"
+      LIB_SDL="-L/usr/X11R6/lib -lSDL"
     fi ])
     if test "x$withval" == "x";
     then
       PLUGINS=${PLUGINS}"sdl "
-      LIB_SDL="-lSDL"
+      LIB_SDL="-L/usr/X11R6/lib -lSDL"
     fi
 AC_ARG_WITH(glide,
   [  --with-glide[=name]     Glide (3dfx) support (default disabled)],



And second patch expands usage of autoconf/configure features.
We use bindir/datadir/libdir instead prefix/something... Now
user is able to run configure in such way as:
./configure --bindir=/space/shuttle/bin --datadir=/earth/share --libdir=/moon/lib ;-)
Also I added DESTDIR feature. automake always generate Makefile.in (from Makefile.am)
with this feature but since vlc doesn't use automake, so I added this manually...
This is standard way to install whole package in other place than /. Ie
make install DESTDIR=/tmp/rpm-build-root

diff -urN vlc-0.2.61.org/Makefile.in vlc-0.2.61/Makefile.in
--- vlc-0.2.61.org/Makefile.in	Sun Feb 18 12:34:33 2001
+++ vlc-0.2.61/Makefile.in	Sun Feb 18 12:43:39 2001
@@ -18,7 +18,12 @@
 PLUGINS=@PLUGINS@
 INSTALL=@INSTALL@
 ARCH=@ARCH@
+
 prefix=@prefix@
+bindir=@bindir@
+datadir=@datadir@
+libdir=@libdir@
+
 CC=@CC@
 SHELL=@SHELL@
 
@@ -440,15 +445,15 @@
 	rm -rf .dep
 
 install:
-	mkdir -p $(prefix)/bin
-	$(INSTALL) vlc $(prefix)/bin
+	mkdir -p $(DESTDIR)$(bindir)
+	$(INSTALL) vlc $(DESTDIR)$(bindir)
 # ugly
-	for alias in "" @ALIASES@ ; do if test $$alias ; then rm -f $(prefix)/bin/$$alias && ln -s vlc $(prefix)/bin/$$alias ; fi ; done
-	mkdir -p $(prefix)/lib/videolan/vlc
-	$(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(prefix)/lib/videolan/vlc
-	mkdir -p $(prefix)/share/videolan
-	$(INSTALL) -m 644 share/*.psf $(prefix)/share/videolan
-	$(INSTALL) -m 644 share/*.png $(prefix)/share/videolan
+	for alias in "" @ALIASES@ ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias && ln -s vlc $(DESTDIR)$(bindir)/$$alias ; fi ; done
+	mkdir -p $(DESTDIR)$(libdir)/videolan/vlc
+	$(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(DESTDIR)$(libdir)/videolan/vlc
+	mkdir -p $(DESTDIR)$(datadir)/videolan
+	$(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/videolan
+	$(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/videolan
 
 show:
 	@echo CC: $(CC)

-- 
Arkadiusz Miśkiewicz, AM2-6BONE    [ PLD GNU/Linux IPv6 ]
http://www.t17.ds.pwr.wroc.pl/~misiek/ipv6/   [ enabled ]




More information about the vlc-devel mailing list