]> git.sesse.net Git - mlt/commitdiff
add support for xlocale.h on FreeBSD
authorDan Dennedy <dan@dennedy.org>
Thu, 22 Dec 2011 05:48:06 +0000 (21:48 -0800)
committerDan Dennedy <dan@dennedy.org>
Thu, 22 Dec 2011 05:48:06 +0000 (21:48 -0800)
with assistance from Gleb Smirnoff

src/framework/Makefile
src/framework/configure
src/framework/mlt_property.h

index 004d3e5ad21f05f5f56cd42ecf8d769b7761e1a3..a493dfbc2b24224b9279acde0fa151caf95037f5 100644 (file)
@@ -1,4 +1,5 @@
 include ../../config.mak
+include config.mak
 
 NAME = libmlt$(LIBSUF)
 TARGET = $(NAME).$(version)
@@ -17,6 +18,11 @@ NAME = libmlt$(LIBSUF)
 TARGET = $(NAME).$(version)
 SONAME = $(NAME).$(soversion)
 SHFLAGS += -Wl,-soname,$(SONAME)
+       ifeq ($(targetos), FreeBSD)
+               ifdef HAVE_SYS_PARAM_H
+                       CFLAGS += -DHAVE_SYS_PARAM_H
+               endif
+       endif
 endif
 
 OBJS = mlt_frame.o \
index 52655ae6d3c02f8142937337ba99f4c27b032d9e..439a473e3f9107629652287e580d10ae1c656e3e 100755 (executable)
@@ -1,2 +1,10 @@
 #!/bin/sh
 echo "framework        -I$prefix/include -I$prefix/include/mlt -D_REENTRANT    -L$libdir -lmlt" >> ../../packages.dat
+
+echo -n > config.mak
+if [ "$(uname -s)" = "FreeBSD" ]
+then
+       printf "#include <sys/param.h>\n int main(){ return 0;}" | gcc -c -x c - >/dev/null 2>&1
+       [ "$?" -eq 0 ] && echo "HAVE_SYS_PARAM_H=1" >> config.mak
+fi
+exit 0
index 2f92ff76d0552aa71074e4dbb2a9e1e72ff7c6df..c50302f779d262cb84366f5bb807edb53094cb8a 100644 (file)
 
 #include "mlt_types.h"
 
-#if defined(__GLIBC__) || defined(__DARWIN__)
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#if defined(__GLIBC__) || defined(__DARWIN__) || (__FreeBSD_version >= 1000002)
 #include <xlocale.h>
 #else
 typedef void* locale_t;