]> git.sesse.net Git - mlt/commitdiff
Fix missing PIC flags for bindings (2931009)
authorDan Dennedy <dan@dennedy.org>
Sun, 2 May 2010 19:10:06 +0000 (12:10 -0700)
committerDan Dennedy <dan@dennedy.org>
Sun, 2 May 2010 19:10:06 +0000 (12:10 -0700)
Also, use g++ for linking bindings because some systems (OS X) do not
otherwise know to link with libstdc++.

src/swig/csharp/build
src/swig/java/build
src/swig/lua/build
src/swig/perl/Makefile.PL
src/swig/perl/build
src/swig/php/build
src/swig/python/build
src/swig/ruby/build
src/swig/tcl/build

index 5769110c63cf6504da46bfb9473a3e248f9602df..7ca1aa02fd270abf296cea879ce63a5eca041c09 100755 (executable)
@@ -17,10 +17,10 @@ then
        swig -c++ -I../../mlt++ -I../.. -csharp -dllimport libmltsharp -outdir src_swig -namespace Mlt mlt.i || exit $?
 
        # Compile the wrapper
-       g++ -D_GNU_SOURCE -c -rdynamic -pthread -I../.. mlt_wrap.cxx -fPIC || exit $?
+       g++ -fPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. mlt_wrap.cxx || exit $?
        
        # Create the module
-       gcc -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o libmltsharp.so || exit $?
+       g++ -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o libmltsharp.so || exit $?
 
        # Compile the library assembly
        mcs -out:mlt-sharp.dll -target:library src_swig/*.cs
index 1cc29bb8d7009602003bc630d71441a6762097e1..09ff1f112954d0e3702da29612eb4557c9344604 100755 (executable)
@@ -24,10 +24,10 @@ then
        swig -c++ -I../../mlt++ -I../.. -java -outdir src_swig/org/mltframework -package org.mltframework mlt.i || exit $?
 
        # Compile the wrapper
-       g++ -D_GNU_SOURCE -c -rdynamic -pthread -I../.. mlt_wrap.cxx $JAVA_INCLUDE || exit $?
+       g++ -fPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. mlt_wrap.cxx $JAVA_INCLUDE || exit $?
        
        # Create the module
-       gcc -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o libmlt_java.so || exit $?
+       g++ -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o libmlt_java.so || exit $?
 
        # Compile the test
        javac `find src_swig -name '*.java'` || exit $?
index e37491153376bf44942c47b216859aa19bac7d2f..2187bf30a447529e9d7f069d6c64f6ee97752a18 100755 (executable)
@@ -19,7 +19,7 @@ then
        g++ -fPIC -DPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. mlt_wrap.cxx || exit $?
 
        # Create the module
-       gcc -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit $?
+       g++ -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit $?
 else
        echo Lua not installed.
        exit 1
index 2093b9411688d60b38463ab027a639b736d8a172..f8d07d0fb341da0daecfc9b2ffa989ecbf6dc414 100644 (file)
@@ -7,7 +7,7 @@ system( "ln -sf ../mlt.i" );
 system( "swig -c++ -I../../mlt++ -I../.. -perl5 mlt.i" ); 
 WriteMakefile(
        'NAME'    => 'mlt',
-       'CC'      => '${CXX} -I../..',
+       'CC'      => '${CXX} -fPIC -I../..',
        'OPTIMIZE' => '-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386',
        'LIBS'    => ['-L../../mlt++ -lmlt++'],
        'OBJECT'  => 'mlt_wrap.o',
index 84023863bee671a7a2f084579a6053ab3337f9a5..1a5b6e236b439f6acb2aeb5532c1fe95e74e6d1f 100755 (executable)
@@ -7,3 +7,4 @@ then
 fi
 
 perl Makefile.PL || exit 1
+make
index f88b94cc1223de12f02f715879adf269364a4f9d..1c53e1c384de2127ad3db20431df03508c9ce612 100755 (executable)
@@ -10,4 +10,4 @@ fi
 ln -sf ../mlt.i
 swig -c++ -I../../mlt++ -I../.. -php5 -noproxy mlt.i
 g++ -fPIC -DPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. `php-config --includes` mlt_wrap.cpp
-gcc -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit $?
+g++ -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit $?
index 6709da4dc464846b0f9f6a819938f0b41b49d3fb..0e87d7f0333c83129c5e552e3b176d49a0b87418 100755 (executable)
@@ -24,7 +24,7 @@ then
        g++ -fPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. -I$PYTHON_INCLUDE mlt_wrap.cxx || exit $?
 
        # Create the module
-       gcc -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o _mlt.so || exit $?
+       g++ -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o _mlt.so || exit $?
 else
        echo Python not installed.
        exit 1
index 2fcd34f37db1a76e1c57c6134951767c5416f853..5ef45d29afa2c00d54bf3b18eab3695527d9e253 100755 (executable)
@@ -9,3 +9,4 @@ system( "swig -c++ -ruby -I../../mlt++ -I../.. mlt.i" )
 $CFLAGS += " -I../.."
 $LDFLAGS += " -L../../mlt++ -lmlt++"
 create_makefile('mlt')
+system( "make" )
index 3a541d3304fb99058cb3cc889146689d5b9a4bf8..eeb7a8e90180982178b67a65bf3aa6c70c7378fc 100755 (executable)
@@ -16,12 +16,11 @@ then
        swig -c++ -I../../mlt++ -I../.. -tcl mlt.i || exit 1
 
        # Compile the wrapper
-       g++ -D_GNU_SOURCE -c -rdynamic -pthread -I../.. mlt_wrap.cxx || exit 1
+       g++ -fPIC -D_GNU_SOURCE -c -rdynamic -pthread -I../.. mlt_wrap.cxx || exit 1
 
        # Create the module
-       gcc -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit 1
+       g++ -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit 1
 else
        echo "Unable to locate tclsh."
        exit 1
 fi
-