]> git.sesse.net Git - mlt/commitdiff
+ Added a --libdir switch to the configure and build and fixed test case compilation
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 29 Nov 2005 12:05:30 +0000 (12:05 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 29 Nov 2005 12:05:30 +0000 (12:05 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++@868 d19143bc-622f-0410-bfdd-b5b2a6649095

mlt++/configure
mlt++/src/Makefile

index c1310fce98a06c1f95671dcd6c3ef545ec6ab7dc..05573c0988010edea8f2a11221fc30e1472bf5a8 100755 (executable)
@@ -7,13 +7,26 @@ path=`which mlt-config 2>/dev/null`
 prefix=`mlt-config --prefix`
 [ "$prefix" = "" ] && echo "Can't locate MLT's prefix - please reconfigure MLT." && exit 1
 
+# Default the libdir
+libdir=""
+
 # Allow override from command line
-[ "$1" != "" ] && prefix="${1#--prefix=}"
+for i in $*
+do
+       case $i in
+               --prefix=* ) prefix="${1#--prefix=}" ;;
+               --libdir=* ) libdir="${1#--libdir=}" ;;
+       esac
+done
+
+# Determine the libdir if it's not specified in the args
+[ "$libdir" = "" ] && libdir=$prefix/lib
 
 # Sanity check
 [ ! -d "$prefix" ] && echo "Invalid prefix $prefix - aborting" && exit 1
 
 echo "prefix=$prefix" > config.mak
+echo "libdir=$libdir" >> config.mak
 
 targetos=$(uname -s)
 
@@ -21,12 +34,14 @@ case $targetos in
        Darwin)
                echo LIBSUF=.dylib
         echo "CXXFLAGS+=-D__DARWIN__ -Wall -fPIC `mlt-config --cflags`"
-        echo "LDFLAGS+=-dynamiclib `mlt-config --libs` `mlt-config miracle --libs` `mlt-config valerie --libs` -single_module"
+               echo "LIBFLAGS=-dynamiclib"
+        echo "LDFLAGS+=`mlt-config --libs` `mlt-config miracle --libs` `mlt-config valerie --libs` -single_module"
                ;;
        Linux)
                echo LIBSUF=.so
         echo "CXXFLAGS+=-pthread -Wall -fPIC `mlt-config --cflags`"
-        echo "LDFLAGS+=-shared `mlt-config --libs` `mlt-config miracle --libs`"
+               echo "LIBFLAGS=-shared"
+        echo "LDFLAGS+=`mlt-config --libs` `mlt-config miracle --libs`"
                ;;
 esac >> config.mak
 
index 6f72bb2b3f888d0f998a543a0a3155af863f54ea..5d205b80d44897c67ae792bce47d1bed54e8c0b8 100644 (file)
@@ -34,14 +34,14 @@ CC=g++
 all:           $(TARGET)
 
 $(TARGET):     $(OBJS)
-       $(CC) -o $@ $(OBJS) $(LDFLAGS)
+       $(CC) $(LIBFLAGS) -o $@ $(OBJS) $(LDFLAGS)
 
 clean:
        $(RM) $(OBJS) $(TARGET)
 
 install:
-       $(INSTALL) -d "$(DESTDIR)$(prefix)/lib"
-       $(INSTALL) -m 755 $(TARGET) $(DESTDIR)$(prefix)/lib
+       $(INSTALL) -d "$(DESTDIR)$(libdir)"
+       $(INSTALL) -m 755 $(TARGET) $(DESTDIR)$(libdir)
        $(INSTALL) -d "$(DESTDIR)$(prefix)/include/mlt++"
        $(INSTALL) -m 644 $(HEADERS) "$(DESTDIR)$(prefix)/include/mlt++"
        /sbin/ldconfig || true