summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-10-25 02:18:15 +0000
committerjstebbins <[email protected]>2011-10-25 02:18:15 +0000
commit4e43bd06146941548c894321a34619e199f1d2f0 (patch)
tree402ff66db9ce22fcbf3823772aa2d498114e1418 /make
parent2c8e57bd3ee064493f2c188b08f137a3d02c6985 (diff)
Add optional yasm contrib
To enable, "configure --enable-local-yasm" Ubuntu 10.04 LTS (lucid) has yasm 0.8 which is no longer compatible with x264. This change allows us to build yasm as a contrib and use it for building both Libav and x264 which require yasm. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4314 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'make')
-rw-r--r--make/configure.py11
-rw-r--r--make/include/contrib.defs6
-rw-r--r--make/include/main.defs4
3 files changed, 18 insertions, 3 deletions
diff --git a/make/configure.py b/make/configure.py
index df9e853a5..02816658d 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -1091,6 +1091,11 @@ def createCLI():
h = IfHost( 'Min OS X Version', '*-*-darwin*', none=optparse.SUPPRESS_HELP ).value
grp.add_option( '--minver', default=None, action='store', metavar='VER',
help=h )
+
+ h = IfHost( 'Build and use local yasm', '*-*-*', none=optparse.SUPPRESS_HELP ).value
+ grp.add_option( '--enable-local-yasm', default=False, action='store_true', help=h )
+ print "opt yasm"
+
cli.add_option_group( grp )
## add tool locations
@@ -1246,6 +1251,7 @@ try:
strip = ToolProbe( 'STRIP.exe', 'strip' )
tar = ToolProbe( 'TAR.exe', 'gtar', 'tar' )
wget = ToolProbe( 'WGET.exe', 'wget', abort=False )
+ print "Probing yasm"
yasm = ToolProbe( 'YASM.exe', 'yasm', abort=False )
xcodebuild = ToolProbe( 'XCODEBUILD.exe', 'xcodebuild', abort=False )
@@ -1455,6 +1461,7 @@ int main ()
doc.add( 'PREFIX/', cfg.prefix_final + os.sep )
doc.addBlank()
+ doc.add( 'FEATURE.local_yasm', int( options.enable_local_yasm ) )
doc.add( 'FEATURE.asm', 'disabled' )
doc.add( 'FEATURE.gtk', int( not options.disable_gtk ))
doc.add( 'FEATURE.gtk.update.checks', int( not options.disable_gtk_update_checks ))
@@ -1511,8 +1518,10 @@ int main ()
doc.add( 'GCC.ldsysroot', '$(GCC.sysroot)' )
doc.add( 'GCC.ldminver', '$(GCC.minver)' )
- if options.enable_asm and not Tools.yasm.fail:
+ print "enable_asm %d %d" % (options.enable_asm, options.enable_local_yasm)
+ if options.enable_asm and ( not Tools.yasm.fail or options.enable_local_yasm ):
asm = ''
+ print "xxxxxxx enable_asm"
if build.match( 'i?86-*' ):
asm = 'x86'
doc.add( 'LIBHB.GCC.D', 'HAVE_MMX', append=True )
diff --git a/make/include/contrib.defs b/make/include/contrib.defs
index 003152b85..4c813c7fb 100644
--- a/make/include/contrib.defs
+++ b/make/include/contrib.defs
@@ -82,6 +82,7 @@ define import.CONTRIB.defs
$(1).CONFIGURE.args = !sete @dir !bootstrap !env !exe @host @prefix !deps !shared !static !extra
+ $(1).CONFIGURE.env.LOCAL_PATH =
$(1).CONFIGURE.env.CC = CC=$$($(1).GCC.gcc)
$(1).CONFIGURE.env.CXX = CXX=$$($(1).GCC.gxx)
##
@@ -103,7 +104,7 @@ define import.CONTRIB.defs
$(1).CONFIGURE.env.LDFLAGS = LDFLAGS="$$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver)"
$(1).CONFIGURE.env.PKG_CONFIG_PATH = PKG_CONFIG_PATH="$$(call fn.ABSOLUTE,$$(CONTRIB.build/))lib/pkgconfig"
- $(1).CONFIGURE.env.args = !CC !CFLAGS !CXX !CXXFLAGS !CPPFLAGS !LDFLAGS !PKG_CONFIG_PATH
+ $(1).CONFIGURE.env.args = !CC !CFLAGS !CXX !CXXFLAGS !CPPFLAGS !LDFLAGS !PKG_CONFIG_PATH !LOCAL_PATH
$(1).CONFIGURE.env = $$(call fn.ARGS,$(1).CONFIGURE.env,$$($(1).CONFIGURE.env.args))
$(1).CONFIGURE.target = $$($(1).build/).stamp.configure
@@ -115,12 +116,13 @@ define import.CONTRIB.defs
##
## target: build
##
+ $(1).BUILD.env =
$(1).BUILD.make = $$(MAKE)
$(1).BUILD.dir = $$($(1).EXTRACT.dir/)
$(1).BUILD.extra =
$(1).BUILD.ntargets =
- $(1).BUILD.args = !make @dir !extra !ntargets
+ $(1).BUILD.args = !env !make @dir !extra !ntargets
$(1).BUILD.args.dir = -C $$(1)
$(1).BUILD.target = $$($(1).build/).stamp.build
diff --git a/make/include/main.defs b/make/include/main.defs
index 63b7aa38c..e68f679f7 100644
--- a/make/include/main.defs
+++ b/make/include/main.defs
@@ -83,6 +83,10 @@ ifeq (1-linux,$(FEATURE.gtk)-$(BUILD.system))
MODULES += gtk
endif
+ifeq (1,$(FEATURE.local_yasm))
+ MODULES += contrib/yasm
+endif
+
###############################################################################
MODULES += doc