]> git.sesse.net Git - mlt/commitdiff
More configure and build tuning
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 14 Apr 2004 19:27:34 +0000 (19:27 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 14 Apr 2004 19:27:34 +0000 (19:27 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@278 d19143bc-622f-0410-bfdd-b5b2a6649095

19 files changed:
configure
src/albino/Makefile
src/framework/Makefile
src/framework/mlt_pool.c
src/humperdink/Makefile
src/inigo/Makefile
src/miracle/Makefile
src/miracle/miracle_local.c
src/modules/Makefile
src/modules/avformat/Makefile
src/modules/dv/Makefile
src/modules/gtk2/Makefile
src/modules/resample/Makefile
src/modules/sdl/Makefile
src/modules/vorbis/Makefile
src/modules/westley/Makefile
src/tests/Makefile
src/valerie/Makefile
src/valerie/valerie_socket.c

index 60a9b635fe221349816f20e120d2ed08f54b2262..073f858c7eeb0b9adf8d641b3f0dfd2a50904240 100755 (executable)
--- a/configure
+++ b/configure
@@ -39,11 +39,14 @@ function build_config
                echo "LARGE_FILE=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
 
                [ "$cpu" != "" ] &&
-               echo "TARGET_ARCH=-march=$cpu" &&
-               echo "TARGET_CPU=-mcpu=$cpu"
+               echo "TARGETARCH=-march=$cpu" &&
+               echo "TARGETCPU=-mcpu=$cpu"
 
-               echo "OPTIMISATIONS=-O4 \$(TARGET_ARCH) \$(TARGET_CPU) -pipe -ffast-math -fomit-frame-pointer"
-               echo "CFLAGS=-Wall \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE) -pthread"
+               [ "`uname`" = "Linux" ] &&
+               echo "LIBDL=-ldl"
+
+               echo "OPTIMISATIONS=-O4 -pipe -ffast-math -fomit-frame-pointer"
+               echo "CFLAGS+=-Wall \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE) -pthread"
        ) > config.mak
 
        echo "#!/bin/sh" > mlt-config
index bb9bd08ea6b76ce1f00b7e3a21d09661532f03c2..ef1b48f612261432ec954dce5cac3cd109c2b3ba 100644 (file)
@@ -6,7 +6,7 @@ OBJS = albino.o
 
 CFLAGS += -I.. -rdynamic
 
-LDFLAGS = -L ../miracle -lmiracle 
+LDFLAGS += -L ../miracle -lmiracle 
 
 SRCS := $(OBJS:.o=.c)
 
index 00bfefc9cded2ef804643a00b4c9305fc5a3908f..501fdb9e087b9fb4b972bccdb58780096c614a14 100644 (file)
@@ -23,7 +23,7 @@ SRCS := $(OBJS:.o=.c)
 
 CFLAGS += -pthread -DPREFIX="\"$(prefix)\""
 
-LDFLAGS = -lm -ldl -lpthread
+LDFLAGS += -lm $(LIBDL) -lpthread
 
 all:   $(TARGET)
 
index 12ad00c34c0f499ba4c3db5a303cb58b28dfe2e8..87da0df1273a415f22c4f34842896a2b376c99ba 100644 (file)
 #include "mlt_deque.h"
 
 #include <stdlib.h>
-#include <malloc.h>
 #include <string.h>
 #include <pthread.h>
 
+// Not nice - memalign is defined here apparently?
+#ifdef linux
+#include <malloc.h>
+#endif
+
 /** Singleton repositories
 */
 
@@ -101,7 +105,11 @@ static void *pool_fetch( mlt_pool this )
                else
                {
                        // We need to generate a release item
+#ifdef linux
                        mlt_release release = memalign( 16, this->size );
+#else
+                       mlt_release release = malloc( this->size );
+#endif
 
                        // Initialise it
                        if ( release != NULL )
index 9314c703c9fd172c92579384114ab6e0f2014450..0e96cb7a1052ce2cb9b1426116083c6fe29edddc 100644 (file)
@@ -8,7 +8,7 @@ OBJS = client.o \
 
 CFLAGS += -I.. -rdynamic
 
-LDFLAGS = -L ../valerie -lvalerie
+LDFLAGS += -L ../valerie -lvalerie
 
 SRCS := $(OBJS:.o=.c)
 
index eeecf7b9c838c7cff7aade9c8bdf8e6a991e8f2e..296de35a459b0a652f33c61a5e80c3a4938c4f42 100644 (file)
@@ -7,7 +7,7 @@ OBJS = inigo.o \
 
 CFLAGS += -I.. -rdynamic
 
-LDFLAGS = -L ../framework -lmlt 
+LDFLAGS += -L ../framework -lmlt 
 
 SRCS := $(OBJS:.o=.c)
 
index 9d6d7dad66d1aaf2931ab3fdff76238db4c4b4a5..b76ca6a077d91433fbb22fe1120d17102f900b00 100644 (file)
@@ -16,7 +16,7 @@ OBJS = $(APP_OBJS) $(LIB_OBJS)
 
 CFLAGS += -I.. -rdynamic
 
-LDFLAGS = -L ../valerie -lvalerie -L ../framework -lmlt
+LDFLAGS += -L ../valerie -lvalerie -L ../framework -lmlt
 
 SRCS := $(OBJS:.o=.c)
 
index 51f35f804a27f6c646c73e709fafa857eda8df66..f89d90e292962e59d66cb3254e5a1c16a04091af 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <signal.h>
+
+/* Needed for backtrace on linux */
+#ifdef linux
 #include <execinfo.h>
+#endif
 
 /* Valerie header files */
 #include <valerie/valerie_util.h>
@@ -291,6 +295,7 @@ void signal_handler( int sig )
 
 static void sigsegv_handler()
 {
+#ifdef linux
        void *array[ 10 ];
        size_t size;
        char **strings;
@@ -309,6 +314,9 @@ static void sigsegv_handler()
        free( strings );
 
        miracle_log( LOG_CRIT, "\nDone dumping - exiting.\n" );
+#else
+       miracle_log( LOG_CRIT, "\a\nMiracle experienced a segmentation fault.\n" );
+#endif
        exit( EXIT_FAILURE );
 }
 
@@ -495,8 +503,10 @@ static valerie_response miracle_local_execute( miracle_local local, char *comman
 static void miracle_local_close( miracle_local local )
 {
        miracle_delete_all_units();
+#ifdef linux
        pthread_kill_other_threads_np();
        miracle_log( LOG_DEBUG, "Clean shutdown." );
        free( local );
-       //mlt_factory_close( );
+       mlt_factory_close( );
+#endif
 }
index d9722adf1892b71849f18dc406d31c3a2b31f283..c6a8fd1a748251aae44a239dfdc468be3e3e7b0d 100644 (file)
@@ -5,8 +5,8 @@ include make.inc
 all clean depend:
        list='$(SUBDIRS)'; \
        for subdir in $$list; do \
-               if [ -f $$subdir/Makefile ] ; \
-               then [ ! -f disable-$$subdir ] && $(MAKE) -C $$subdir $@ || exit 1; \
+               if [ -f $$subdir/Makefile -a ! -f disable-$$subdir ] ; \
+               then $(MAKE) -C $$subdir $@ || exit 1; \
                fi \
        done
 
@@ -14,8 +14,8 @@ dist-clean:
        rm -f consumers.dat filters.dat producers.dat transitions.dat make.inc; \
        list='$(SUBDIRS)'; \
        for subdir in $$list; do \
-               if [ -f $$subdir/Makefile ] ; \
-               then [ ! -f disable-$$subdir ] && $(MAKE) -C $$subdir $@ || exit 1; \
+               if [ -f $$subdir/Makefile -a ! -f disable-$$subdir ] ; \
+               then $(MAKE) -C $$subdir $@ || exit 1; \
                fi \
        done
 
@@ -23,8 +23,8 @@ install:
        install -m 644 producers.dat filters.dat transitions.dat consumers.dat "$(prefix)/share/mlt/modules"
        list='$(SUBDIRS)'; \
        for subdir in $$list; do \
-               if [ -f $$subdir/Makefile ] ; \
-               then [ ! -f disable-$$subdir ] && $(MAKE) -C $$subdir $@ || exit 1; \
+               if [ -f $$subdir/Makefile -a ! -f disable-$$subdir ] ; \
+               then $(MAKE) -C $$subdir $@ || exit 1; \
                fi \
        done
 
index 5ca36627a01aa72e714b0fb0a4d30dba59f467c8..296fc6cd72214eb3747adf674f841cd687a6394e 100644 (file)
@@ -8,7 +8,7 @@ OBJS = factory.o \
 
 CFLAGS += -I../..
 
-LDFLAGS = -lavformat -lavcodec
+LDFLAGS += -lavformat -lavcodec
 
 SRCS := $(OBJS:.o=.c)
 
index 48d65f2dcb2d2c0e2343e2b0a2f7971baecbb957..0eb3c4159e06ba930dc1e55bdeeadf267f870958 100644 (file)
@@ -8,7 +8,7 @@ OBJS = factory.o \
 
 CFLAGS += -I../..
 
-LDFLAGS=-ldv -lpthread
+LDFLAGS += -ldv -lpthread
 
 SRCS := $(OBJS:.o=.c)
 
index caafc15e7c22520159af1596195c731caab2648b..367bc56d7edba31b9d61de2da50ec24ee7cb8620 100644 (file)
@@ -13,7 +13,7 @@ ASM_OBJS = have_mmx.o \
 
 CFLAGS += `pkg-config gdk-pixbuf-2.0 --cflags` `pkg-config pangoft2 --cflags` -I../..
 
-LDFLAGS = `pkg-config gdk-pixbuf-2.0 --libs` `pkg-config pangoft2 --libs`
+LDFLAGS += `pkg-config gdk-pixbuf-2.0 --libs` `pkg-config pangoft2 --libs`
 
 SRCS := $(OBJS:.o=.c)
 
index ced5ba8ce689dd80f34b5872b7f0e23151e0d59a..ceae3db6d01a4cfbb8ac4a6c631176562dc6ae13 100644 (file)
@@ -7,7 +7,7 @@ OBJS = factory.o \
 
 CFLAGS += -I../..
 
-LDFLAGS= -lsamplerate
+LDFLAGS += -lsamplerate
 
 SRCS := $(OBJS:.o=.c)
 
index b7372cf1cd6bc386f9e29e355df2ecc7ace0463c..0ed2e6d5e264e6d73397aeab871df5197c754ddd 100644 (file)
@@ -7,7 +7,7 @@ OBJS = factory.o \
 
 CFLAGS += -I../.. `sdl-config --cflags`
 
-LDFLAGS= `sdl-config --libs`
+LDFLAGS += `sdl-config --libs`
 
 SRCS := $(OBJS:.o=.c)
 
index cf23e6451200cda78d4a739f44b5ae94ebf3363f..bf1607fb1c44d7c9085032656c8e8cdda77c9d0d 100644 (file)
@@ -7,7 +7,7 @@ OBJS = factory.o \
 
 CFLAGS += -I../..
 
-LDFLAGS = -lvorbisfile -lvorbis
+LDFLAGS += -lvorbisfile -lvorbis
 
 SRCS := $(OBJS:.o=.c)
 
index 39db4fc20ffe23f6c8fdd82bbec5ee9ad27324c9..69cb87473b85a0bf6db210d409398ac1364fd399 100644 (file)
@@ -8,7 +8,7 @@ OBJS = factory.o \
 
 CFLAGS += -I../../ `xml2-config --cflags`
 
-LDFLAGS = `xml2-config --libs`
+LDFLAGS += `xml2-config --libs`
 
 SRCS := $(OBJS:.o=.c)
 
index c85ebe041e9533f1b8e21b5e741658f420521254..70e04b1e4259a9a5869c732c5af330ceeb940cb7 100644 (file)
@@ -4,7 +4,7 @@ TARGET = dan charlie pango pixbuf dissolve luma
 
 CFLAGS += -I.. -rdynamic
 
-LDFLAGS = -L ../framework -L ../modules -lmlt -lmltdv -lmltsdl
+LDFLAGS += -L ../framework -L ../modules -lmlt -lmltdv -lmltsdl
 
 all: $(TARGET)
 
index 7121bb1c5a2e04435aa1abadf2daf059c7806d76..e0beb115a97c38e11d227be29b9fee565781ba9c 100644 (file)
@@ -14,7 +14,7 @@ OBJS = valerie.o \
 
 SRCS := $(OBJS:.o=.c)
 
-LDFLAGS=-ldv -lpthread
+LDFLAGS += -lpthread
 
 all: $(TARGET)
 
index 74e8483430b6bcdf5ac191993c01b7b79d98342f..e0743c1e90fd81dfc0a0ae30df51600b69ab1329 100644 (file)
@@ -32,6 +32,7 @@
 #include <sys/socket.h>
 #include <fcntl.h>
 #include <errno.h>
+#include <netinet/in.h>
 
 /* Application header files */
 #include "valerie_socket.h"