Commit a64c20f2 by devttys0

Added configure option

parent 581aa6b9
...@@ -662,6 +662,7 @@ ac_user_opts=' ...@@ -662,6 +662,7 @@ ac_user_opts='
enable_option_checking enable_option_checking
with_python with_python
enable_clibs enable_clibs
enable_bundles
enable_libmagic enable_libmagic
enable_libfuzzy enable_libfuzzy
enable_pyqtgraph enable_pyqtgraph
...@@ -1285,6 +1286,7 @@ Optional Features: ...@@ -1285,6 +1286,7 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-clibs do not build/install any c libraries --disable-clibs do not build/install any c libraries
--disable-bundles do not install bundled software
--disable-libmagic do not build/install the bundled libmagic library --disable-libmagic do not build/install the bundled libmagic library
--disable-libfuzzy do not build/install the bundled libfuzzy library --disable-libfuzzy do not build/install the bundled libfuzzy library
--disable-pyqtgraph do not install the bundled pyqtgraph library --disable-pyqtgraph do not install the bundled pyqtgraph library
...@@ -3317,6 +3319,14 @@ else ...@@ -3317,6 +3319,14 @@ else
fi fi
# Check whether --enable-bundles was given.
if test "${enable_bundles+set}" = set; then :
enableval=$enable_bundles; BUILD_BUNDLES=0
else
BUILD_BUNDLES=1
fi
# Check whether --enable-libmagic was given. # Check whether --enable-libmagic was given.
if test "${enable_libmagic+set}" = set; then : if test "${enable_libmagic+set}" = set; then :
enableval=$enable_libmagic; BUILD_MAGIC=0 enableval=$enable_libmagic; BUILD_MAGIC=0
...@@ -3358,6 +3368,13 @@ else ...@@ -3358,6 +3368,13 @@ else
SOEXT="so" SOEXT="so"
fi fi
if test "$BUILD_BUNDLES" == "0"
then
BUILD_MAGIC=0
BUILD_FUZZY=0
BUILD_PYQTGRAPH=0
fi
if test "$BUILD_C_LIBS" != "0" if test "$BUILD_C_LIBS" != "0"
then then
if test "$BUILD_MAGIC" != "0" if test "$BUILD_MAGIC" != "0"
......
...@@ -17,6 +17,11 @@ AC_ARG_ENABLE([clibs], ...@@ -17,6 +17,11 @@ AC_ARG_ENABLE([clibs],
[BUILD_C_LIBS=0], [BUILD_C_LIBS=0],
[BUILD_C_LIBS=1]) [BUILD_C_LIBS=1])
AC_ARG_ENABLE([bundles],
[AS_HELP_STRING([--disable-bundles], [do not install bundled software])],
[BUILD_BUNDLES=0],
[BUILD_BUNDLES=1])
AC_ARG_ENABLE([libmagic], AC_ARG_ENABLE([libmagic],
[AS_HELP_STRING([--disable-libmagic], [do not build/install the bundled libmagic library])], [AS_HELP_STRING([--disable-libmagic], [do not build/install the bundled libmagic library])],
[BUILD_MAGIC=0], [BUILD_MAGIC=0],
...@@ -49,6 +54,13 @@ else ...@@ -49,6 +54,13 @@ else
SOEXT="so" SOEXT="so"
fi fi
if test "$BUILD_BUNDLES" == "0"
then
BUILD_MAGIC=0
BUILD_FUZZY=0
BUILD_PYQTGRAPH=0
fi
if test "$BUILD_C_LIBS" != "0" if test "$BUILD_C_LIBS" != "0"
then then
if test "$BUILD_MAGIC" != "0" if test "$BUILD_MAGIC" != "0"
......
...@@ -5,9 +5,6 @@ import binwalk.core.common ...@@ -5,9 +5,6 @@ import binwalk.core.common
# This allows importing of the built-in pyqtgraph if it # This allows importing of the built-in pyqtgraph if it
# is not available on the system at run time. # is not available on the system at run time.
try: sys.path.append(binwalk.core.common.get_libs_path())
import pyqtgraph
except ImportError:
sys.path.append(binwalk.core.common.get_libs_path())
from binwalk.core.module import Modules, ModuleException from binwalk.core.module import Modules, ModuleException
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment