diff options
author | John Stebbins <[email protected]> | 2019-04-15 10:48:56 -0600 |
---|---|---|
committer | John Stebbins <[email protected]> | 2019-04-15 10:48:56 -0600 |
commit | a144fd366bd8ca1030aa785f7cbfa27e84a0b428 (patch) | |
tree | 218cb9a2d9856d6c83f5d2414d457ff5090eacc9 | |
parent | d572956c90cffd6c221368af69ad129e2bc84bdb (diff) |
configure: add option to enable/disable libnuma
It is not supported or not useful in some Linux environments, so allow
disabling it.
-rw-r--r-- | contrib/x265_10bit/module.defs | 4 | ||||
-rw-r--r-- | contrib/x265_12bit/module.defs | 4 | ||||
-rw-r--r-- | contrib/x265_8bit/module.defs | 4 | ||||
-rw-r--r-- | gtk/configure.ac | 9 | ||||
-rw-r--r-- | gtk/module.defs | 3 | ||||
-rw-r--r-- | make/configure.py | 5 | ||||
-rw-r--r-- | test/module.defs | 5 |
7 files changed, 32 insertions, 2 deletions
diff --git a/contrib/x265_10bit/module.defs b/contrib/x265_10bit/module.defs index 252ef50e5..8b950709a 100644 --- a/contrib/x265_10bit/module.defs +++ b/contrib/x265_10bit/module.defs @@ -19,6 +19,10 @@ X265_10.CONFIGURE.static = X265_10.CONFIGURE.shared = -DENABLE_SHARED=OFF X265_10.CONFIGURE.extra = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF +ifneq (1,$(FEATURE.numa)) + X265_10.CONFIGURE.extra += -DENABLE_LIBNUMA=OFF +endif + ifneq (none,$(X265_10.GCC.g)) X265_10.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Debug else diff --git a/contrib/x265_12bit/module.defs b/contrib/x265_12bit/module.defs index f350fff5d..b8827a93a 100644 --- a/contrib/x265_12bit/module.defs +++ b/contrib/x265_12bit/module.defs @@ -19,6 +19,10 @@ X265_12.CONFIGURE.static = X265_12.CONFIGURE.shared = -DENABLE_SHARED=OFF X265_12.CONFIGURE.extra = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DMAIN12=ON +ifneq (1,$(FEATURE.numa)) + X265_12.CONFIGURE.extra += -DENABLE_LIBNUMA=OFF +endif + ifneq (none,$(X265_12.GCC.g)) X265_12.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Debug else diff --git a/contrib/x265_8bit/module.defs b/contrib/x265_8bit/module.defs index 173a95fca..4a4411517 100644 --- a/contrib/x265_8bit/module.defs +++ b/contrib/x265_8bit/module.defs @@ -16,6 +16,10 @@ X265_8.CONFIGURE.static = X265_8.CONFIGURE.shared = -DENABLE_SHARED=OFF X265_8.CONFIGURE.extra = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=OFF -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON +ifneq (1,$(FEATURE.numa)) + X265_8.CONFIGURE.extra += -DENABLE_LIBNUMA=OFF +endif + ifneq (none,$(X265_8.GCC.g)) X265_8.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Debug else diff --git a/gtk/configure.ac b/gtk/configure.ac index c27be12e2..4a1788efb 100644 --- a/gtk/configure.ac +++ b/gtk/configure.ac @@ -73,6 +73,10 @@ AC_ARG_ENABLE(x265, AS_HELP_STRING([--enable-x265], [enable x265 encoder]), use_x265=yes, use_x265=no) +AC_ARG_ENABLE(numa, + AS_HELP_STRING([--enable-numa], [enable x265 NUMA support]), + use_numa=yes, use_numa=no) + AC_ARG_ENABLE(qsv, AS_HELP_STRING([--enable-qsv], [enable QSV encoder]), use_qsv=yes, use_qsv=no) @@ -186,7 +190,10 @@ if test "x$use_fdk_aac" = "xyes" ; then fi if test "x$use_x265" = "xyes" ; then - HB_LIBS="$HB_LIBS -lx265 -lnuma" + HB_LIBS="$HB_LIBS -lx265" +if test "x$use_numa" = "xyes" ; then + HB_LIBS="$HB_LIBS -lnuma" +fi fi if test "x$use_qsv" = "xyes" ; then diff --git a/gtk/module.defs b/gtk/module.defs index 28b5ee38a..2f1e5a021 100644 --- a/gtk/module.defs +++ b/gtk/module.defs @@ -38,6 +38,9 @@ endif ifeq (1,$(FEATURE.x265)) GTK.CONFIGURE.extra += --enable-x265 +ifeq (1,$(FEATURE.numa)) + GTK.CONFIGURE.extra += --enable-numa +endif endif ifeq (1,$(FEATURE.qsv)) diff --git a/make/configure.py b/make/configure.py index 89c94c18c..ef55c05c0 100644 --- a/make/configure.py +++ b/make/configure.py @@ -1238,6 +1238,10 @@ def createCLI( cross = None ): grp.add_argument( '--enable-x265', dest="enable_x265", default=True, action='store_true', help=(( 'enable %s' %h ) if h != argparse.SUPPRESS else h) ) grp.add_argument( '--disable-x265', dest="enable_x265", action='store_false', help=(( 'disable %s' %h ) if h != argparse.SUPPRESS else h) ) + h = IfHost( 'x265 NUMA support', '*-*-linux', none=argparse.SUPPRESS ).value + grp.add_argument( '--enable-numa', dest="enable_numa", default=True, action='store_true', help=(( 'enable %s' %h ) if h != argparse.SUPPRESS else h) ) + grp.add_argument( '--disable-numa', dest="enable_numa", action='store_false', help=(( 'disable %s' %h ) if h != argparse.SUPPRESS else h) ) + h = IfHost( 'FDK AAC audio encoder', '*-*-*', none=argparse.SUPPRESS ).value grp.add_argument( '--enable-fdk-aac', dest="enable_fdk_aac", default=False, action='store_true', help=(( 'enable %s' %h ) if h != argparse.SUPPRESS else h) ) grp.add_argument( '--disable-fdk-aac', dest="enable_fdk_aac", action='store_false', help=(( 'disable %s' %h ) if h != argparse.SUPPRESS else h) ) @@ -1821,6 +1825,7 @@ int main() doc.add( 'FEATURE.vce', int( options.enable_vce )) doc.add( 'FEATURE.x265', int( options.enable_x265 )) + doc.add( 'FEATURE.numa', int( options.enable_x265 and options.enable_numa )) if host.match( '*-*-darwin*' ) and options.cross is None: doc.add( 'FEATURE.xcode', int( not (Tools.xcodebuild.fail or options.disable_xcode) )) diff --git a/test/module.defs b/test/module.defs index cae807520..0f7a16427 100644 --- a/test/module.defs +++ b/test/module.defs @@ -78,7 +78,10 @@ ifeq ($(BUILD.system),darwin) TEST.GCC.f += IOKit CoreServices CoreText CoreGraphics AudioToolbox VideoToolbox CoreMedia CoreVideo Foundation TEST.GCC.l += iconv else ifeq ($(BUILD.system),linux) - TEST.GCC.l += pthread dl m numa + TEST.GCC.l += pthread dl m +ifeq (1, $(FEATURE.numa)) + TEST.GCC.l += numa +endif else ifeq ($(BUILD.system),kfreebsd) TEST.GCC.l += pthread dl m else ifeq ($(BUILD.system),freebsd) |