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 60a9b63..073f858 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 bb9bd08..ef1b48f 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 00bfefc..501fdb9 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 12ad00c..87da0df 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 9314c70..0e96cb7 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 eeecf7b..296de35 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 9d6d7da..b76ca6a 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 51f35f8..f89d90e 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 d9722ad..c6a8fd1 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 5ca3662..296fc6c 100644 (file)
@@ -8,7 +8,7 @@ OBJS = factory.o \
 
 CFLAGS += -I../..
 
-LDFLAGS = -lavformat -lavcodec
+LDFLAGS += -lavformat -lavcodec
 
 SRCS := $(OBJS:.o=.c)
 
index 48d65f2..0eb3c41 100644 (file)
@@ -8,7 +8,7 @@ OBJS = factory.o \
 
 CFLAGS += -I../..
 
-LDFLAGS=-ldv -lpthread
+LDFLAGS += -ldv -lpthread
 
 SRCS := $(OBJS:.o=.c)
 
index caafc15..367bc56 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 ced5ba8..ceae3db 100644 (file)
@@ -7,7 +7,7 @@ OBJS = factory.o \
 
 CFLAGS += -I../..
 
-LDFLAGS= -lsamplerate
+LDFLAGS += -lsamplerate
 
 SRCS := $(OBJS:.o=.c)
 
index b7372cf..0ed2e6d 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 cf23e64..bf1607f 100644 (file)
@@ -7,7 +7,7 @@ OBJS = factory.o \
 
 CFLAGS += -I../..
 
-LDFLAGS = -lvorbisfile -lvorbis
+LDFLAGS += -lvorbisfile -lvorbis
 
 SRCS := $(OBJS:.o=.c)
 
index 39db4fc..69cb874 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 c85ebe0..70e04b1 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 7121bb1..e0beb11 100644 (file)
@@ -14,7 +14,7 @@ OBJS = valerie.o \
 
 SRCS := $(OBJS:.o=.c)
 
-LDFLAGS=-ldv -lpthread
+LDFLAGS += -lpthread
 
 all: $(TARGET)
 
index 74e8483..e0743c1 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"