Skip to content

Commit

Permalink
Added configure option
Browse files Browse the repository at this point in the history
  • Loading branch information
devttys0 committed Jul 21, 2014
1 parent 581aa6b commit a64c20f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
17 changes: 17 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,7 @@ ac_user_opts='
enable_option_checking
with_python
enable_clibs
enable_bundles
enable_libmagic
enable_libfuzzy
enable_pyqtgraph
Expand Down Expand Up @@ -1285,6 +1286,7 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--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-libfuzzy do not build/install the bundled libfuzzy library
--disable-pyqtgraph do not install the bundled pyqtgraph library
Expand Down Expand Up @@ -3317,6 +3319,14 @@ else
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.
if test "${enable_libmagic+set}" = set; then :
enableval=$enable_libmagic; BUILD_MAGIC=0
Expand Down Expand Up @@ -3358,6 +3368,13 @@ else
SOEXT="so"
fi
if test "$BUILD_BUNDLES" == "0"
then
BUILD_MAGIC=0
BUILD_FUZZY=0
BUILD_PYQTGRAPH=0
fi
if test "$BUILD_C_LIBS" != "0"
then
if test "$BUILD_MAGIC" != "0"
Expand Down
12 changes: 12 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ AC_ARG_ENABLE([clibs],
[BUILD_C_LIBS=0],
[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],
[AS_HELP_STRING([--disable-libmagic], [do not build/install the bundled libmagic library])],
[BUILD_MAGIC=0],
Expand Down Expand Up @@ -49,6 +54,13 @@ else
SOEXT="so"
fi

if test "$BUILD_BUNDLES" == "0"
then
BUILD_MAGIC=0
BUILD_FUZZY=0
BUILD_PYQTGRAPH=0
fi

if test "$BUILD_C_LIBS" != "0"
then
if test "$BUILD_MAGIC" != "0"
Expand Down
5 changes: 1 addition & 4 deletions src/binwalk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

# This allows importing of the built-in pyqtgraph if it
# is not available on the system at run time.
try:
import pyqtgraph
except ImportError:
sys.path.append(binwalk.core.common.get_libs_path())
sys.path.append(binwalk.core.common.get_libs_path())

from binwalk.core.module import Modules, ModuleException

0 comments on commit a64c20f

Please sign in to comment.