-
Notifications
You must be signed in to change notification settings - Fork 540
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #774 in SNORT/snort3 from dynamic_plugins to master
Squashed commit of the following: commit 429abf88893a45cdb4d2c4a8a5b41c18284cb166 Author: Michael Altizer <mialtize@cisco.com> Date: Thu Jan 12 18:28:03 2017 -0500 pkg-config: Remove unnecessary optional cppflags from the default Nothing in the exported headers requires PCAP, DNET, or OpenSSL headers. commit 482b74a103a5d6d88c1391e5c4219687cfeef875 Author: Michael Altizer <mialtize@cisco.com> Date: Thu Jan 12 18:24:06 2017 -0500 cmake: Fix exporting Hyperscan cppflags in snort.pc commit ab4ba847964e2d5e255e07663be9ab9fa35b5203 Author: Michael Altizer <mialtize@cisco.com> Date: Thu Jan 12 17:57:03 2017 -0500 cmake: Add configure_cmake.sh convenience wrapper for extras commit 1df401e0cc1ba3b60a10a74c041ae133407de7f7 Author: Michael Altizer <mialtize@cisco.com> Date: Thu Jan 12 17:49:11 2017 -0500 build: Synchronize installed files between autotools and cmake commit ebaf6fb2a8e05d50619dea337eb504996a3f7df6 Author: Michael Altizer <mialtize@cisco.com> Date: Wed Jan 11 02:33:18 2017 -0500 build: Build dynamic plugins as modules rather than shared libraries This removes the 'lib' prefix from dynamic plugins, leaving them with their normal bare names and a .so file extension. No SONAME nor other, OS-level dynamic library versioning method is applied. The cmake macro for adding dynamic plugins has been renamed from add_shared_library to add_dynamic_module. On OSX, this means that plugins will no longer have the dynamic library suffix (.dylib) and only plugins with the .so extension will be loaded, just like on other platforms. The cmake and automake templates for extras have been updated accordingly and used to regenerate the respective files in extras. commit 65cc51c527d07a3d1dfbc89c3ac9885f1c352984 Author: Michael Altizer <mialtize@cisco.com> Date: Thu Jan 12 14:00:55 2017 -0500 cmake: Fix setting CMAKE_C[XX]_FLAGS for subdirectories Don't clobber the existing CMAKE_C_FLAGS and CMAKE_CXX_FLAGS. Additionally, add subdirectories after flags have been pulled from pkg-config so that they are properly propagated. commit 8a1f748c6ab8836e6236c7b6922c42162138dd18 Author: Michael Altizer <mialtize@cisco.com> Date: Wed Jan 11 01:33:50 2017 -0500 build: Remove unnecessary check for pcap_lib_version() The function has been present since libpcap 0.8 and we require higher than that, so don't bother.
- Loading branch information
Showing
120 changed files
with
1,225 additions
and
979 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
#!/bin/sh | ||
# Convenience wrapper for easily viewing/setting options that | ||
# the project's CMake scripts will recognize | ||
|
||
set -e | ||
command="$0 $*" | ||
|
||
# check for `cmake` command | ||
type cmake > /dev/null 2>&1 || { | ||
echo "\ | ||
This package requires CMake, please install it first, then you may | ||
use this configure script to access CMake equivalent functionality.\ | ||
" >&2; | ||
exit 1; | ||
} | ||
|
||
usage="\ | ||
Usage: $0 [OPTION]... [VAR=VALUE]... | ||
--builddir= The build directory | ||
--generator= run cmake --help for a list of generators | ||
--prefix= Snort++ installation prefix | ||
" | ||
|
||
sourcedir="$( cd "$( dirname "$0" )" && pwd )" | ||
|
||
# Function to append a CMake cache entry definition to the | ||
# CMakeCacheEntries variable | ||
# $1 is the cache entry variable name | ||
# $2 is the cache entry variable type | ||
# $3 is the cache entry variable value | ||
append_cache_entry () { | ||
CMakeCacheEntries="$CMakeCacheEntries -D $1:$2=$3" | ||
} | ||
|
||
# set defaults | ||
builddir=build | ||
prefix=/usr/local/snort | ||
CMakeCacheEntries="" | ||
append_cache_entry CMAKE_INSTALL_PREFIX PATH $prefix | ||
|
||
|
||
# parse arguments | ||
while [ $# -ne 0 ]; do | ||
case "$1" in | ||
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | ||
*) optarg= ;; | ||
esac | ||
|
||
case "$1" in | ||
--help|-h) | ||
echo "${usage}" 1>&2 | ||
exit 1 | ||
;; | ||
--builddir=*) | ||
builddir=$optarg | ||
;; | ||
--generator=*) | ||
CMakeGenerator="$optarg" | ||
;; | ||
--prefix=*) | ||
prefix=$optarg | ||
append_cache_entry CMAKE_INSTALL_PREFIX PATH $optarg | ||
;; | ||
*) | ||
echo "Invalid option '$1'. Try $0 --help to see available options." | ||
exit 1 | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
if [ -d $builddir ]; then | ||
# If build directory exists, check if it has a CMake cache | ||
if [ -f $builddir/CMakeCache.txt ]; then | ||
# If the CMake cache exists, delete it so that this configuration | ||
# is not tainted by a previous one | ||
rm -f $builddir/CMakeCache.txt | ||
fi | ||
else | ||
# Create build directory | ||
mkdir -p $builddir | ||
fi | ||
|
||
echo "Build Directory : $builddir" | ||
echo "Source Directory: $sourcedir" | ||
cd $builddir | ||
|
||
gen="" | ||
[ "$CMakeGenerator" ] && gen+=" -G $CMakeGenerator" | ||
|
||
cmake $gen \ | ||
-DCMAKE_CXX_FLAGS:STRING="$CXXFLAGS $CPPFLAGS" \ | ||
-DCMAKE_C_FLAGS:STRING="$CFLAGS $CPPFLAGS" \ | ||
$CMakeCacheEntries $sourcedir | ||
|
||
echo "# This is the command used to configure this build" > config.status | ||
echo $command >> config.status | ||
chmod u+x config.status | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.