From eb9a05cd25e46cec6710e1122fc4ff758b4ae2e3 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Mon, 18 Mar 2019 13:58:28 -0700 Subject: [PATCH] GH-307: Build binpac as a shared lib, not static by default --- CHANGES | 4 ++++ CMakeLists.txt | 12 ++++++++++++ NEWS | 4 ++++ VERSION | 2 +- aux/bifcl | 2 +- aux/binpac | 2 +- aux/broccoli | 2 +- aux/broctl | 2 +- aux/broker | 2 +- aux/zeek-aux | 2 +- cmake | 2 +- configure | 4 ++++ 12 files changed, 32 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index 1e97c6328c..f1aa05b9ce 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,8 @@ +2.6-167 | 2019-03-18 13:58:28 -0700 + + * GH-307: Build binpac as a shared lib, not static by default (Jon Siwek, Corelight) + 2.6-166 | 2019-03-18 11:45:35 -0700 * Add source file path control options for Input and Intel frameworks (Christian Kreibich, Corelight) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c82a6d9ff..cfe0b29ed9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,7 +97,15 @@ FindRequiredPackage(ZLIB) if (NOT BINPAC_EXE_PATH AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/aux/binpac/CMakeLists.txt) + + set(ENABLE_STATIC_ONLY_SAVED ${ENABLE_STATIC_ONLY}) + + if ( BUILD_STATIC_BINPAC ) + set(ENABLE_STATIC_ONLY true) + endif() + add_subdirectory(aux/binpac) + set(ENABLE_STATIC_ONLY ${ENABLE_STATIC_ONLY_SAVED}) endif () FindRequiredPackage(BinPAC) @@ -286,10 +294,14 @@ if ( BROKER_ROOT_DIR ) set(brodeps ${brodeps} ${BROKER_LIBRARY} ${CAF_LIBRARIES}) include_directories(BEFORE ${BROKER_INCLUDE_DIR}) else () + set(ENABLE_STATIC_ONLY_SAVED ${ENABLE_STATIC_ONLY}) + if ( BUILD_STATIC_BROKER ) set(ENABLE_STATIC_ONLY true) endif() + add_subdirectory(aux/broker) + set(ENABLE_STATIC_ONLY ${ENABLE_STATIC_ONLY_SAVED}) if ( BUILD_STATIC_BROKER ) set(brodeps ${brodeps} broker_static) diff --git a/NEWS b/NEWS index 862a294ce9..7bbf4543f2 100644 --- a/NEWS +++ b/NEWS @@ -79,6 +79,10 @@ Changed Functionality by default. The limit can also be ignored case-by-case via the "HTTP::max_files_policy" hook. +- The binpac library is now only compiled as a shared library by default. + To revert back to compiling only a static library, there's the + ``--enable-static-binpac`` configure option. + Removed Functionality --------------------- diff --git a/VERSION b/VERSION index 7913ca2d43..787f4ccb54 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.6-166 +2.6-167 diff --git a/aux/bifcl b/aux/bifcl index 7e214967f4..44622332fb 160000 --- a/aux/bifcl +++ b/aux/bifcl @@ -1 +1 @@ -Subproject commit 7e214967f4a4416a9e4c45d58b43f569e933b365 +Subproject commit 44622332fb1361383799be33e365704caacce199 diff --git a/aux/binpac b/aux/binpac index b6cfc1243f..bb2476465e 160000 --- a/aux/binpac +++ b/aux/binpac @@ -1 +1 @@ -Subproject commit b6cfc1243f3e63037131e214f5c64a03eaad1d00 +Subproject commit bb2476465e304a00c368bd73d40cc6f734be5311 diff --git a/aux/broccoli b/aux/broccoli index 1b437de310..41841d8f64 160000 --- a/aux/broccoli +++ b/aux/broccoli @@ -1 +1 @@ -Subproject commit 1b437de310fb137ff271018065280ee1e65d6deb +Subproject commit 41841d8f64bdb062860309f7b36513212e81befa diff --git a/aux/broctl b/aux/broctl index 5601ca0ac3..b5b2b7895f 160000 --- a/aux/broctl +++ b/aux/broctl @@ -1 +1 @@ -Subproject commit 5601ca0ac31a59356bb67343cb3a66eca7386651 +Subproject commit b5b2b7895f264c825d7ff4bd8a88a4d5b6c4821c diff --git a/aux/broker b/aux/broker index 22560477b5..7d89cb7cd7 160000 --- a/aux/broker +++ b/aux/broker @@ -1 +1 @@ -Subproject commit 22560477b5d107fc75af628f67d3afe9ec211b35 +Subproject commit 7d89cb7cd7213db9be59258f0f76a084d5d87879 diff --git a/aux/zeek-aux b/aux/zeek-aux index a95eee2a2f..96c787cb39 160000 --- a/aux/zeek-aux +++ b/aux/zeek-aux @@ -1 +1 @@ -Subproject commit a95eee2a2f018f899dfe19a4f9f2425c041f05bd +Subproject commit 96c787cb396a5aad2d3ea3b2087f2a1fcd6b7216 diff --git a/cmake b/cmake index ad4d2fa614..0c1ee634a8 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit ad4d2fa614390e6bb288fd2be4387a96ff3fb9e7 +Subproject commit 0c1ee634a8f915e738da72c797a17aad9cb618dd diff --git a/configure b/configure index ada9d21322..98bfc5308d 100755 --- a/configure +++ b/configure @@ -53,6 +53,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]... --enable-jemalloc link against jemalloc --enable-broccoli build or install the Broccoli library (deprecated) --enable-static-broker build broker statically (ignored if --with-broker is specified) + --enable-static-binpac build binpac statically (ignored if --with-binpac is specified) --disable-broctl don't install Broctl --disable-auxtools don't build or install auxiliary tools --disable-perftools don't try to build with Google Perftools @@ -227,6 +228,9 @@ while [ $# -ne 0 ]; do --enable-static-broker) append_cache_entry BUILD_STATIC_BROKER BOOL true ;; + --enable-static-binpac) + append_cache_entry BUILD_STATIC_BINPAC BOOL true + ;; --disable-broctl) append_cache_entry INSTALL_BROCTL BOOL false ;;