summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/ffmpeg/module.defs5
-rw-r--r--libhb/module.defs2
-rw-r--r--make/configure.py2
-rw-r--r--make/variant/freebsd.defs5
-rw-r--r--test/module.defs1
5 files changed, 13 insertions, 2 deletions
diff --git a/contrib/ffmpeg/module.defs b/contrib/ffmpeg/module.defs
index 9460b5e56..87f236380 100644
--- a/contrib/ffmpeg/module.defs
+++ b/contrib/ffmpeg/module.defs
@@ -22,6 +22,11 @@ FFMPEG.CONFIGURE.build =
FFMPEG.CONFIGURE.env.LOCAL_PATH = PATH="$(call fn.ABSOLUTE,$(CONTRIB.build/)bin):$(PATH)"
FFMPEG.BUILD.env = PATH="$(call fn.ABSOLUTE,$(CONTRIB.build/)bin):$(PATH)"
+ifeq (freebsd,$(BUILD.system))
+ FFMPEG.CONFIGURE.env += CFLAGS=-I$(LOCALBASE)/include
+ FFMPEG.CONFIGURE.env += LDFLAGS=-L$(LOCALBASE)/lib
+endif
+
FFMPEG.CONFIGURE.extra = \
--enable-gpl \
--disable-doc \
diff --git a/libhb/module.defs b/libhb/module.defs
index 3c45869f7..593328b10 100644
--- a/libhb/module.defs
+++ b/libhb/module.defs
@@ -49,7 +49,7 @@ LIBHB.GCC.D += __LIBHB__ USE_PTHREAD
LIBHB.GCC.I += $(LIBHB.build/) $(CONTRIB.build/)include
ifeq ($(BUILD.system),freebsd)
- LIBHB.GCC.I += /usr/local/include/libxml2
+ LIBHB.GCC.I += $(LOCALBASE)/include/libxml2
else ifneq (,$(filter $(BUILD.system),darwin cygwin mingw))
LIBHB.GCC.I += $(CONTRIB.build/)include/libxml2
else
diff --git a/make/configure.py b/make/configure.py
index c3eeee34d..3a9d1c257 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -1512,7 +1512,7 @@ try:
class Tools:
ar = ToolProbe( 'AR.exe', 'ar', abort=True )
cp = ToolProbe( 'CP.exe', 'cp', abort=True )
- gcc = ToolProbe( 'GCC.gcc', 'gcc', IfHost( 'gcc-4', '*-*-cygwin*' ))
+ gcc = ToolProbe( 'GCC.gcc', 'gcc', IfHost( 'clang', '*-*-freebsd*' ), IfHost( 'gcc-4', '*-*-cygwin*' ))
if host.match( '*-*-darwin*' ):
gmake = ToolProbe( 'GMAKE.exe', 'make', 'gmake', abort=True )
diff --git a/make/variant/freebsd.defs b/make/variant/freebsd.defs
index f575c8bed..d8a7245f8 100644
--- a/make/variant/freebsd.defs
+++ b/make/variant/freebsd.defs
@@ -1,5 +1,10 @@
+# LOCALBASE is where FreeBSD ports are installed. default is '/usr/local'.
+LOCALBASE ?= /usr/local
+
TARGET.dylib.ext = .so
+GCC.I = $(LOCALBASE)/include
+GCC.L = $(LOCALBASE)/lib
GCC.D = LIBICONV_PLUG
GCC.args.dylib = -shared
diff --git a/test/module.defs b/test/module.defs
index 2ecbb0767..eaa10ea69 100644
--- a/test/module.defs
+++ b/test/module.defs
@@ -81,6 +81,7 @@ else ifeq ($(BUILD.system),linux)
else ifeq ($(BUILD.system),kfreebsd)
TEST.GCC.l += pthread dl m
else ifeq ($(BUILD.system),freebsd)
+ TEST.GCC.L += $(LOCALBASE)/lib
TEST.GCC.l += pthread m
else ifeq ($(BUILD.system),solaris)
TEST.GCC.l += pthread nsl socket