Skip to content

Commit

Permalink
bb11343: Adding configure option to remove yara at compile-time.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mickey Sola committed Jul 22, 2015
1 parent d1e73db commit baeb625
Show file tree
Hide file tree
Showing 28 changed files with 387 additions and 67 deletions.
2 changes: 2 additions & 0 deletions Makefile.in
Expand Up @@ -190,6 +190,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/yara.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
Expand Down Expand Up @@ -397,6 +398,7 @@ GENHTML = @GENHTML@
GETENT = @GETENT@
GPERF = @GPERF@
GREP = @GREP@
HAVE_YARA = @HAVE_YARA@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
Expand Down
2 changes: 2 additions & 0 deletions clamav-milter/Makefile.in
Expand Up @@ -166,6 +166,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/yara.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
Expand Down Expand Up @@ -352,6 +353,7 @@ GENHTML = @GENHTML@
GETENT = @GETENT@
GPERF = @GPERF@
GREP = @GREP@
HAVE_YARA = @HAVE_YARA@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
Expand Down
2 changes: 2 additions & 0 deletions clambc/Makefile.in
Expand Up @@ -147,6 +147,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/yara.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
Expand Down Expand Up @@ -288,6 +289,7 @@ GENHTML = @GENHTML@
GETENT = @GETENT@
GPERF = @GPERF@
GREP = @GREP@
HAVE_YARA = @HAVE_YARA@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
Expand Down
2 changes: 2 additions & 0 deletions clamconf/Makefile.in
Expand Up @@ -165,6 +165,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/yara.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
Expand Down Expand Up @@ -306,6 +307,7 @@ GENHTML = @GENHTML@
GETENT = @GETENT@
GPERF = @GPERF@
GREP = @GREP@
HAVE_YARA = @HAVE_YARA@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
Expand Down
2 changes: 2 additions & 0 deletions clamd/Makefile.in
Expand Up @@ -165,6 +165,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/yara.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
Expand Down Expand Up @@ -319,6 +320,7 @@ GENHTML = @GENHTML@
GETENT = @GETENT@
GPERF = @GPERF@
GREP = @GREP@
HAVE_YARA = @HAVE_YARA@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
Expand Down
2 changes: 2 additions & 0 deletions clamdscan/Makefile.in
Expand Up @@ -165,6 +165,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/yara.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
Expand Down Expand Up @@ -317,6 +318,7 @@ GENHTML = @GENHTML@
GETENT = @GETENT@
GPERF = @GPERF@
GREP = @GREP@
HAVE_YARA = @HAVE_YARA@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
Expand Down
2 changes: 2 additions & 0 deletions clamdtop/Makefile.in
Expand Up @@ -147,6 +147,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/yara.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
Expand Down Expand Up @@ -323,6 +324,7 @@ GENHTML = @GENHTML@
GETENT = @GETENT@
GPERF = @GPERF@
GREP = @GREP@
HAVE_YARA = @HAVE_YARA@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
Expand Down
2 changes: 2 additions & 0 deletions clamscan/Makefile.in
Expand Up @@ -166,6 +166,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/yara.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
Expand Down Expand Up @@ -308,6 +309,7 @@ GENHTML = @GENHTML@
GETENT = @GETENT@
GPERF = @GPERF@
GREP = @GREP@
HAVE_YARA = @HAVE_YARA@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
Expand Down
2 changes: 2 additions & 0 deletions clamsubmit/Makefile.in
Expand Up @@ -165,6 +165,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/yara.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
Expand Down Expand Up @@ -306,6 +307,7 @@ GENHTML = @GENHTML@
GETENT = @GETENT@
GPERF = @GPERF@
GREP = @GREP@
HAVE_YARA = @HAVE_YARA@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
Expand Down
51 changes: 50 additions & 1 deletion configure
Expand Up @@ -635,7 +635,9 @@ ac_includes_default="\
#endif"

enable_option_checking=no
ac_subst_vars='ENABLE_LLVM_FALSE
ac_subst_vars='ENABLE_YARA_FALSE
ENABLE_YARA_TRUE
ENABLE_LLVM_FALSE
ENABLE_LLVM_TRUE
ltdl_LTLIBOBJS
ltdl_LIBOBJS
Expand Down Expand Up @@ -679,6 +681,7 @@ CLAMSCAN_CPPFLAGS
FRESHCLAM_CPPFLAGS
CLAMSUBMIT_CFLAGS
CLAMSUBMIT_LIBS
HAVE_YARA
subdirs
WERR_CFLAGS_MILTER
WERR_CFLAGS
Expand Down Expand Up @@ -925,6 +928,7 @@ with_system_llvm
with_llvm_linking
enable_llvm
enable_sha_collector_for_internal_use
enable_yara
with_libcurl
'
ac_precious_vars='build_alias
Expand Down Expand Up @@ -1604,6 +1608,7 @@ Optional Features:
enable warnings as error for distcheck [default=no]
--enable-llvm enable 'llvm' JIT/verifier support [default=auto]

--disable-yara do not include yara support

Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
Expand Down Expand Up @@ -22828,6 +22833,24 @@ $as_echo "#define HAVE__INTERNAL__SHA_COLLECT 1" >>confdefs.h
fi


# Check whether --enable-yara was given.
if test "${enable_yara+set}" = set; then :
enableval=$enable_yara; enable_yara=$enableval
else
enable_yara="yes"
fi


if test "$enable_yara" = "yes"; then

$as_echo "#define HAVE_YARA 1" >>confdefs.h
]

fi




case "$host_os" in
freebsd*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kinfo_getvmmap in -lutil" >&5
Expand Down Expand Up @@ -25655,7 +25678,16 @@ else
ENABLE_LLVM_FALSE=
fi

if test "$enable_yara" != "no"; then
ENABLE_YARA_TRUE=
ENABLE_YARA_FALSE='#'
else
ENABLE_YARA_TRUE='#'
ENABLE_YARA_FALSE=
fi

no_recursion="yes";

ac_config_files="$ac_config_files libclamav/Makefile"

cat >confcache <<\_ACEOF
Expand Down Expand Up @@ -25873,6 +25905,10 @@ if test -z "${ENABLE_LLVM_TRUE}" && test -z "${ENABLE_LLVM_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_LLVM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_YARA_TRUE}" && test -z "${ENABLE_YARA_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_YARA\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi

: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
Expand Down Expand Up @@ -28606,6 +28642,19 @@ fi

fi


$as_echo_n " yara : "
if test "x$enable_yara" = "xno"; then :
$as_echo "$enable_yara (disabled)"
elif test "x$enable_yara" = "xyes"; then :
$as_echo "$enable_yara"
elif test "x$enable_yara" = "x"; then :
$as_echo "$enable_yara"
else
$as_echo "$enable_yara ($enable_yara)"
fi


# Yep, downgrading the compiler avoids the bug too:
# 4.0.x, and 4.1.0 are the known buggy versions
# 3.4 doesn't have the bug
Expand Down
5 changes: 5 additions & 0 deletions configure.ac
Expand Up @@ -123,6 +123,7 @@ m4_include([m4/reorganization/clamdtop.m4])
m4_include([m4/reorganization/distcheck.m4])
m4_include([m4/reorganization/llvm.m4])
m4_include([m4/reorganization/sha_collect.m4])
m4_include([m4/reorganization/yara.m4])

m4_include([m4/reorganization/bsd.m4])

Expand Down Expand Up @@ -180,7 +181,10 @@ fi

AM_CONDITIONAL([ENABLE_LLVM],
[test "$subdirfailed" != "yes" && test "$enable_llvm" != "no"])
AM_CONDITIONAL([ENABLE_YARA],
[test "$enable_yara" != "no"])
no_recursion="yes";

AC_OUTPUT([libclamav/Makefile])

# Print a summary of what features we enabled
Expand Down Expand Up @@ -245,6 +249,7 @@ if test "x$XML_LIBS" = "x"; then
else
CL_MSG_STATUS([libxml2 ],[yes, from $XML_HOME],[])
fi
CL_MSG_STATUS([yara ],[$enable_yara],[$enable_yara])

# Yep, downgrading the compiler avoids the bug too:
# 4.0.x, and 4.1.0 are the known buggy versions
Expand Down
2 changes: 2 additions & 0 deletions database/Makefile.in
Expand Up @@ -163,6 +163,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/yara.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
Expand Down Expand Up @@ -254,6 +255,7 @@ GENHTML = @GENHTML@
GETENT = @GETENT@
GPERF = @GPERF@
GREP = @GREP@
HAVE_YARA = @HAVE_YARA@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
Expand Down
2 changes: 2 additions & 0 deletions docs/Makefile.in
Expand Up @@ -163,6 +163,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/yara.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
Expand Down Expand Up @@ -288,6 +289,7 @@ GENHTML = @GENHTML@
GETENT = @GETENT@
GPERF = @GPERF@
GREP = @GREP@
HAVE_YARA = @HAVE_YARA@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
Expand Down
2 changes: 2 additions & 0 deletions etc/Makefile.in
Expand Up @@ -164,6 +164,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/yara.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
Expand Down Expand Up @@ -284,6 +285,7 @@ GENHTML = @GENHTML@
GETENT = @GETENT@
GPERF = @GPERF@
GREP = @GREP@
HAVE_YARA = @HAVE_YARA@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
Expand Down
2 changes: 2 additions & 0 deletions freshclam/Makefile.in
Expand Up @@ -166,6 +166,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/reorganization/distcheck.m4 \
$(top_srcdir)/m4/reorganization/llvm.m4 \
$(top_srcdir)/m4/reorganization/sha_collect.m4 \
$(top_srcdir)/m4/reorganization/yara.m4 \
$(top_srcdir)/m4/reorganization/bsd.m4 \
$(top_srcdir)/m4/reorganization/libs/curl.m4 \
$(top_srcdir)/m4/reorganization/substitutions.m4 \
Expand Down Expand Up @@ -310,6 +311,7 @@ GENHTML = @GENHTML@
GETENT = @GETENT@
GPERF = @GPERF@
GREP = @GREP@
HAVE_YARA = @HAVE_YARA@
INCLTDL = @INCLTDL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
Expand Down

0 comments on commit baeb625

Please sign in to comment.