From 43cbe2a9fc72b834ddce448ced7117ab2bbb7cf7 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Tue, 26 Oct 2010 17:13:33 -0500 Subject: [PATCH] Added configure option to build aux. tools. Also updated submodules to fix small bug in CMake module path. --- CMakeLists.txt | 5 ++++- aux | 2 +- binpac | 2 +- configure | 21 +++++++++++++++++++-- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c791105b33..c6a9bb3d6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,7 +143,10 @@ add_subdirectory(src) add_subdirectory(policy) #add_subdirectory(scripts) #add_subdirectory(doc) -#add_subdirectory(aux) + +if (INSTALL_AUXTOOLS) + add_subdirectory(aux) +endif () ## ## Build Summary diff --git a/aux b/aux index c0c62958b3..25a7ae58d8 160000 --- a/aux +++ b/aux @@ -1 +1 @@ -Subproject commit c0c62958b333762475baa17fd729500d90a3a98e +Subproject commit 25a7ae58d8ba7b92bb05545b9c0a5a2832f011e1 diff --git a/binpac b/binpac index c1f3724df9..b2d36176cd 160000 --- a/binpac +++ b/binpac @@ -1 +1 @@ -Subproject commit c1f3724df92ebb4e6a6f7f018cde472c5f2218a7 +Subproject commit b2d36176cd627b9249ab747dc74a765d802bdc61 diff --git a/configure b/configure index 45f38ad667..00730750c0 100755 --- a/configure +++ b/configure @@ -31,6 +31,8 @@ Usage: $0 [OPTION]... [VAR=VALUE]... 'binpac' subdirectory --install-binpac if --build-binpac, this option adds BinPAC build files to the install target + --install-auxtools build and install auxilliary tools located + in 'aux' subdirectory Required Packages in Non-Standard Locations: --with-openssl=PATH path to OpenSSL install root @@ -66,6 +68,7 @@ use_IPv6=false enable_perftools=false build_binpac=false skip_binpac_install=true +install_auxtools=false # parse arguments while [ $# -ne 0 ]; do @@ -116,6 +119,14 @@ while [ $# -ne 0 ]; do --install-binpac) skip_binpac_install=false ;; + --install-auxtools) + if [ -f $sourcedir/aux/CMakeLists.txt ]; then + install_auxtools=true + else + echo "Error: Bro-Aux source not found in $sourcedir/aux" >&2 + exit 1 + fi + ;; --with-openssl=*) openssl_root=$optarg ;; @@ -185,14 +196,20 @@ set(ENABLE_PERFTOOLS $enable_perftools CACHE STRING "use Google's perftools" FORCE) # If the following option is set to true, then instead of searching for -# an installation of BinPac, it will be downloaded into the 'binpac' -# subdirectory if necessary and then built +# an installation of BinPac, it will be built from source already +# available in the 'binpac' subdirectory set(BinPAC_PREFER_BUILD $build_binpac CACHE STRING "retrieve and build BinPAC dependency from source" FORCE) set(BinPAC_SKIP_INSTALL $skip_binpac_install CACHE STRING "don't install BinPAC if built from source" FORCE) +# If the following option is set to true, then auxilliary tools will +# be installed alongside Bro if their source is located in the 'aux' +# subdirectory +set(INSTALL_AUXTOOLS $install_auxtools + CACHE STRING "install Bro auxilliary tools" FORCE) + ####################################################################### # Packages in Non-Standard Locations # Uncomment/edit options below in order to aid the CMake