diff --git a/CHANGES b/CHANGES index 93cfe4028b..3026314161 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,10 @@ +4.1.0-dev.277 | 2021-03-05 16:14:23 -0800 + + * Avoid reporting paths repeatedly in zeek-config --include_dir (Christian Kreibich, Corelight) + + * Fix comment in IP analyzer (Tim Wojtulewicz, Corelight) + 4.1.0-dev.272 | 2021-03-01 11:36:06 -0800 * Change update-zeekygen-docs.sh to set release branch in Sphinx config (Jon Siwek, Corelight) diff --git a/VERSION b/VERSION index ace324edfb..a4ce34900d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.1.0-dev.272 +4.1.0-dev.277 diff --git a/zeek-config.in b/zeek-config.in index fef957633d..534608b5ad 100755 --- a/zeek-config.in +++ b/zeek-config.in @@ -17,11 +17,25 @@ binpac_root=@ZEEK_CONFIG_BINPAC_ROOT_DIR@ caf_root=@ZEEK_CONFIG_CAF_ROOT_DIR@ broker_root=@ZEEK_CONFIG_BROKER_ROOT_DIR@ -include_dir=${include_dir}:@ZEEK_CONFIG_PCAP_INCLUDE_DIR@ -include_dir=${include_dir}:@ZEEK_CONFIG_ZLIB_INCLUDE_DIR@ -include_dir=${include_dir}:@ZEEK_CONFIG_OPENSSL_INCLUDE_DIR@ -include_dir=${include_dir}:@ZEEK_CONFIG_LibKrb5_INCLUDE_DIR@ -include_dir=${include_dir}:@ZEEK_CONFIG_GooglePerftools_INCLUDE_DIR@ +add_path() { + # $1: existing path + # $2: path to add + if test -z "$2" || test "$1" = "$2" || + echo "$1" | grep -q "^$2:" 2>/dev/null || + echo "$1" | grep -q ":$2:" 2>/dev/null || + echo "$1" | grep -q ":$2$" 2>/dev/null; then + echo "$1" + return + fi + + echo "$1:$2" +} + +include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_PCAP_INCLUDE_DIR@") +include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_ZLIB_INCLUDE_DIR@") +include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_OPENSSL_INCLUDE_DIR@") +include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_LibKrb5_INCLUDE_DIR@") +include_dir=$(add_path "$include_dir" "@ZEEK_CONFIG_GooglePerftools_INCLUDE_DIR@") usage="\ Usage: zeek-config [--version] [--build_type] [--prefix] [--lib_dir] [--script_dir] [--site_dir] [--plugin_dir] [--config_dir] [--python_dir] [--include_dir] [--cmake_dir] [--zeekpath] [--zeek_dist] [--binpac_root] [--caf_root] [--broker_root]"