diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2021-01-13 19:26:24 +0200 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2021-01-13 19:26:24 +0200 |
commit | 8c20dc919f7d54eb48fb60f39ba5e1d466a70763 (patch) | |
tree | 44d89f278d5dd066603e5ab9c0b270bc8eb4ad51 /configure.in.in | |
download | klamav-8c20dc919f7d54eb48fb60f39ba5e1d466a70763.tar.gz klamav-8c20dc919f7d54eb48fb60f39ba5e1d466a70763.zip |
Initial commit
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'configure.in.in')
-rw-r--r-- | configure.in.in | 162 |
1 files changed, 162 insertions, 0 deletions
diff --git a/configure.in.in b/configure.in.in new file mode 100644 index 0000000..b8a5925 --- /dev/null +++ b/configure.in.in @@ -0,0 +1,162 @@ +#MIN_CONFIG(3.3.5) + +AM_INIT_AUTOMAKE(klamav, 0.1) +AC_C_BIGENDIAN +AC_CHECK_KDEMAXPATHLEN + +############################################################################### +# BEGIN PKG-CONFIG CHECK +############################################################################### + +AC_ARG_VAR(PKGCONFIGFOUND, [Path to pkg-config]) +AC_CHECK_PROG(PKGCONFIGFOUND, pkg-config, [yes]) + +############################################################################### +# END PKG-CONFIG CHECK +############################################################################### + +############################################################################### +# BEGIN SQLITE CHECK +############################################################################### + +LIB_SQLITE="" + +AC_ARG_WITH(included-sqlite, + AC_HELP_STRING([--without-included-sqlite],[build KlamAV using system sqlite library]), + [included_sqlite=$withval], + [included_sqlite=yes] +) + +if test x$included_sqlite = xno; then + if test x$PKGCONFIGFOUND = xyes; then + PKG_CHECK_MODULES(SQLITE, sqlite3 >= 3.0, have_sqlite=yes,have_sqlite=no) + + if test x$have_sqlite = xyes; then + LIB_SQLITE=`pkg-config --libs sqlite3` + else + AC_MSG_ERROR(Can't find sqlite database library. Check your installation of sqlite or use included sqlite.) + fi + fi +fi + +AC_SUBST(LIB_SQLITE) +AM_CONDITIONAL(with_included_sqlite, [test x$included_sqlite = xyes]) + +# Determine pointer size for sqlite +KDE_CHECK_TYPES +AC_DEFINE(SQLITE_PTR_SZ, SIZEOF_CHAR_P, [Determine pointer size for SQLite]) + +############################################################################### +# END SQLITE CHECK +############################################################################### + + +# ---- Taken from KOffice ---------------------- +# --- Check for KDE 3.2 or 3.3 or 3.4 or 3.5 --- + +AC_MSG_CHECKING([for KDE version]) + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +kdeversion_save_CXXFLAGS="$CXXFLAGS" +kdeversion_safe_LIBS="$LIBS" +LIBS="$LIBS $X_EXTRA_LIBS" +CXXFLAGS="$CXXFLAGS $all_includes" + +AC_COMPILE_IFELSE([ +#include <kdeversion.h> +#if ! ( KDE_IS_VERSION( 3, 2, 90 ) ) +#error KDE 3.2 +#endif +], + need_kde32_compat="no" +, + need_kde32_compat="yes" +) + +AC_COMPILE_IFELSE([ +#include <kdeversion.h> +#if ! ( KDE_IS_VERSION( 3, 3, 90 ) ) +#error KDE 3.3 +#endif +], + need_kde33_compat="no" +, + need_kde33_compat="yes" +) + +AC_COMPILE_IFELSE([ +#include <kdeversion.h> +#if ! ( KDE_IS_VERSION( 3, 4, 90 ) ) +#error KDE 3.4 +#endif +], + need_kde34_compat="no" +, + need_kde34_compat="yes" +) + +AC_COMPILE_IFELSE([ +#include <kdeversion.h> +#if ! ( KDE_IS_VERSION( 3, 5, 2 ) ) +#error KDE 3.5.x (x < 2) +#endif +], + need_kde351_compat="no" +, + need_kde351_compat="yes" +) +CXXFLAGS="$kdeversion_save_CXXFLAGS" +LIBS="$kdeversion_safe_LIBS" +AC_LANG_RESTORE + +if test "$need_kde32_compat" = "yes"; then + AC_MSG_ERROR([You have KDE 3.2.x. KlamAV needs KDE 3.5.2 or greater.]) +else + if test "$need_kde33_compat" = "yes"; then + AC_MSG_ERROR([You have KDE 3.3.x KlamAV needs KDE 3.5.2 or greater.]) + else + if test "$need_kde34_compat" = "yes"; then + AC_MSG_ERROR([You have KDE 3.4.x KlamAV needs KDE 3.5.2 or greater.]) + else + if test "$need_kde351_compat" = "yes"; then + AC_MSG_ERROR([You have KDE 3.5.1. KlamAV needs KDE 3.5.2 or greater.]) + else + AC_MSG_RESULT([KDE 3.5.x (x >=2) or SVN trunk]) + fi + fi + fi +fi + + +# --- End KDE 3.2 check --- + + + + +AC_CHECK_LIB(clamav, cl_scanfile, [LIB_CLAM=" -lclamav";],AC_MSG_ERROR(Can't find ClamAV's libraries. Please check your installation of ClamAV.)) +AC_SUBST(LIB_CLAM) + +AC_CHECK_LIB(clamav, cl_free, [ tempres="no" ],tempres="yes") +if test "$tempres" = "yes"; then + AC_DEFINE([SUPPORT_CLAMAV_V095],[],[Support ClamAV 0.95]) +fi + +dnl disable updates + +# Whether we should use the disableupdates memory allocation debugging library. +AC_MSG_CHECKING(whether to use disable-updates (build KlamAV with GUI updates disabled )) +AC_ARG_WITH(disableupdates, +[ --with-disableupdates build KlamAV with GUI updates disabled . ], +[if [[ "$withval" = "yes" ]]; then + disableupdates=1 + AC_MSG_RESULT(yes) +else + disableupdates=1 + AC_MSG_RESULT(no) +fi], [ disableupdates=0; AC_MSG_RESULT(no) ] +) + +if [[ $disableupdates -eq 1 ]]; then + AC_DEFINE(DISABLE_UPDATES, 1, "Define to disable gui updates") +fi |