]> git.sesse.net Git - mlt/commitdiff
Enable build on NetBSD (3090684)
authorDan Dennedy <dan@dennedy.org>
Wed, 12 Jan 2011 03:19:09 +0000 (19:19 -0800)
committerDan Dennedy <dan@dennedy.org>
Wed, 12 Jan 2011 03:19:09 +0000 (19:19 -0800)
configure
src/mlt++/configure
src/modules/avformat/configure
src/modules/kino/endian_types.h
src/modules/kino/riff.cc
src/modules/qimage/configure
src/modules/sox/configure

index af159a505d0e0065c19f9b1d62f72b5e5608496d..c36779c4c3d5ab8d1be2b68451e10078dd26d083 100755 (executable)
--- a/configure
+++ b/configure
@@ -97,6 +97,14 @@ build_config()
                echo "RDYNAMIC=-rdynamic"
                echo "LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed"
                ;;
+               NetBSD)
+               [ "$(uname -m)" = "amd64" ] && echo "ARCH_X86_64=1" && echo "CFLAGS+=-DARCH_X86_64"
+               echo "OPTIMISATIONS+=-ffast-math"
+               echo "CFLAGS+=-pthread"
+               echo "SHFLAGS=-shared"
+               echo "RDYNAMIC=-rdynamic"
+               echo "LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed"
+               ;;
                *)
                ;;
                esac
@@ -171,7 +179,7 @@ case $targetos in
        Darwin)
        LIBSUF=".dylib"
        ;;
-       Linux|FreeBSD)
+       Linux|FreeBSD|NetBSD)
        LIBSUF=".so"
        ;;
        *)
index e83b6ed10987c582a6016e254808a080186c91c6..e7c0de62b92c57a7b5c5a3e48ce77aeb672fd38e 100755 (executable)
@@ -11,7 +11,7 @@ case $targetos in
                echo "CXXFLAGS+=-D__DARWIN__ -Wall -fPIC"
                echo "LIBFLAGS=-dynamiclib -single_module"
                ;;
-       Linux|FreeBSD)
+       Linux|FreeBSD|NetBSD)
                echo LIBSUF=.so
                echo "CXXFLAGS+=-Wall $WARNINGS -fPIC -DPIC"
                echo "LIBFLAGS=-shared"
index 654133b768f293aa81a1c466b6018bbe253d37cc..29e13ad695ea31b7a31c70f6b45f8c34f72d3766 100755 (executable)
@@ -36,7 +36,7 @@ else
        Darwin)
                export LIBSUF=.dylib
                ;;
-       Linux|FreeBSD)
+       Linux|FreeBSD|NetBSD)
                export LIBSUF=.so
                ;;
        *)
index d66cdb65caa28a1229e7598dcee79c8762b71cb7..7d4ab8688af6707f75ec339c7b33f341cd69036f 100644 (file)
 #define _ENDIAN_TYPES_H
 
 /* Needed for BYTE_ORDER and BIG/LITTLE_ENDIAN macros. */
+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
 #ifndef _BSD_SOURCE
 # define _BSD_SOURCE
-#ifndef __FreeBSD__
 # include <endian.h>
-#else
-# include <sys/endian.h>
-#endif /* __FreeBSD__ */
 # undef  _BSD_SOURCE
 #else
-#ifndef __FreeBSD__
 # include <endian.h>
+#endif
 #else
 # include <sys/endian.h>
-#endif /* __FreeBSD__ */
-#endif
+#endif /* !defined(__FreeBSD__) && !defined(__NetBSD__) */
 
 #include <sys/types.h>
-#ifndef __FreeBSD__
+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
 #include <byteswap.h>
 #else
 #define bswap_16(x) bswap16(x)
 #define bswap_32(x) bswap32(x)
 #define bswap_64(x) bswap64(x)
-#endif /* __FreeBSD__ */
+#endif /* !defined(__FreeBSD__) && !defined(__NetBSD__) */
 
 static inline int8_t bswap(const int8_t& x)
 {
index 6a57b87e669f02f269a68ad50b221d212f4ecf90..efd91d61c0967710d1a4f952786b0429719a5782 100644 (file)
@@ -25,9 +25,6 @@
 //#include <stdio.h>
 #include <iostream>
 #include <iomanip>
-#ifndef __FreeBSD__
-#include <byteswap.h>
-#endif /* __FreeBSD__ */
 
 using std::cout;
 using std::hex;
index d33c1fefde35babbc6e6c1ba6b4e724a9ddded27..8f1a6ad76ec266b882e7917ce35694c376892734 100755 (executable)
@@ -24,7 +24,7 @@ else
        Darwin)
                export LIBSUF=.dylib
                ;;
-       Linux|FreeBSD)
+       Linux|FreeBSD|NetBSD)
                export LIBSUF=.so
                ;;
        *)
index 9df730af6e8e259d65cef0820bc18cba7d7a68cd..c1790be0c6c2ee8506a90d420791d4eb5fd588da 100755 (executable)
@@ -8,7 +8,7 @@ then
        Darwin)
                LDD="otool -L"
                ;;
-       Linux|FreeBSD)
+       Linux|FreeBSD|NetBSD)
                LDD="ldd"
                ;;
        *)