21
21
dnl For a release change [devel] to the real version [0.xy]
22
22
dnl also change VERSION below
23
AC_INIT([ClamAV], [0.96], [http://bugs.clamav.net/], [clamav], [http://www.clamav.net/])
23
AC_INIT([ClamAV], [0.96.3], [http://bugs.clamav.net/], [clamav], [http://www.clamav.net/])
25
25
AH_BOTTOM([#include "platform.h"])
26
26
dnl put configure auxiliary into config
42
42
AC_DEFINE([PACKAGE], PACKAGE_NAME, [Name of package])
44
44
dnl change this on a release
45
dnl VERSION="devel-`date +%Y%m%d`"
47
46
AC_DEFINE_UNQUOTED([VERSION],"$VERSION",[Version number of package])
52
51
LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
53
52
AC_SUBST([LIBCLAMAV_VERSION])
430
426
VERSION_SUFFIX="$VERSION_SUFFIX-exp"
429
build_configure_args=`echo "$ac_configure_args" | sed -e 's/[\"]//g'`
430
AC_SUBST([BUILD_CONFIGURE_FLAGS], [$build_configure_args])
432
AX_CHECK_UNAME_SYSCALL
433
433
AC_CHECK_LIB([socket], [bind], [LIBS="$LIBS -lsocket"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsocket"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsocket"; CLAMD_LIBS="$CLAMD_LIBS -lsocket"])
434
434
AC_SEARCH_LIBS([gethostent],[nsl], [(LIBS="$LIBS -lnsl"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lnsl"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lnsl"; CLAMD_LIBS="$CLAMD_LIBS -lnsl")])
591
592
AC_MSG_WARN([****** bzip2 libraries are affected by the CVE-2008-1372 bug])
592
593
AC_MSG_WARN([****** We strongly suggest you to update to bzip2 1.0.5.])
593
594
AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!])
595
bzip_check="bugged (CVE-2008-1372)"
595
597
if test "$ac_cv_c_cve_2008_1372" = "linkfailed"; then
596
598
dnl This shouldn't happen
599
601
AC_MSG_WARN([****** You may be affected by CVE-2008-1372 bug, but I need to be able to link a testcase to verify])
600
602
AC_MSG_WARN([****** It is recommended to fix your build environment so that we can run the testcase!])
601
603
AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!])
604
bzip_check="link failed (CVE-2008-1372)"
604
607
case "$ac_cv_c_cve_2008_1372" in
605
608
ok|bugged|linkfailed)
616
if test "$HAVE_LIBBZ2" = "yes"; then
618
if test "$ac_cv_c_cve_2010_0405" = "bugged"; then
619
AC_MSG_WARN([****** bzip2 libraries are affected by the CVE-2010-0405 bug])
620
AC_MSG_WARN([****** We strongly suggest you to update bzip2])
621
AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!])
622
bzip_check="bugged (CVE-2010-0405)"
624
if test "$ac_cv_c_cve_2010_0405" = "linkfailed"; then
625
dnl This shouldn't happen
626
dnl We failed to link but libtool may still be able to link, so don't disable bzip2 just yet
627
AC_MSG_WARN([****** Unable to link bzip2 testcase])
628
AC_MSG_WARN([****** You may be affected by CVE-2010-0405 bug, but I need to be able to link a testcase to verify])
629
AC_MSG_WARN([****** It is recommended to fix your build environment so that we can run the testcase!])
630
AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!])
631
bzip_check="link failed (CVE-2010-0405)"
634
case "$ac_cv_c_cve_2010_0405" in
635
ok|bugged|linkfailed)
606
636
LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $LTLIBBZ2"
607
637
AC_DEFINE([HAVE_BZLIB_H],1,[have bzip2])
830
860
if test "$enable_unsignedbytecode" = "yes"; then
831
861
VERSION_SUFFIX="$VERSION_SUFFIX-unsigned-bc"
832
862
AC_DEFINE([CL_BCUNSIGNED],1,[enable loading of unsigned bytecode])
834
AC_DEFINE([CL_BCUNSIGNED],1,[disable loading of unsigned bytecode])
837
865
AC_ARG_ENABLE([no-cache],
927
955
if test "$have_pthreads" = "yes"; then
928
956
THREAD_LIBS="-lpthread"
929
957
TH_SAFE="-thread-safe"
930
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
931
AC_DEFINE([_REENTRANT],1,[thread safe])
932
958
if test "$want_clamuko" = "yes"; then
933
959
AC_DEFINE([CLAMUKO],1,[enable clamuko])
939
965
if test "$have_pthreads" = "yes"; then
940
966
THREAD_LIBS="-lpthread"
941
967
TH_SAFE="-thread-safe"
942
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
943
AC_DEFINE([_REENTRANT],1,[thread safe])
944
968
if test "$want_clamuko" = "yes"; then
945
969
AC_DEFINE([CLAMUKO],1,[enable clamuko])
953
977
CLAMD_LIBS="$CLAMD_LIBS -lresolv"
954
978
CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lresolv"
955
979
TH_SAFE="-thread-safe"
956
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
957
AC_DEFINE([_REENTRANT],1,[thread safe])
959
981
AC_DEFINE([C_SOLARIS],1,[os is solaris])
962
984
if test "$have_pthreads" = "yes"; then
963
985
THREAD_LIBS="-pthread -lc_r"
964
986
TH_SAFE="-thread-safe"
965
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
966
AC_DEFINE([_REENTRANT],1,[thread safe])
967
987
if test "$want_clamuko" = "yes"; then
968
988
AC_DEFINE([CLAMUKO],1,[enable clamuko])
974
994
if test "$have_pthreads" = "yes"; then
975
995
THREAD_LIBS="-lthr"
976
996
TH_SAFE="-thread-safe"
977
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
978
AC_DEFINE([_REENTRANT],1,[thread safe])
979
997
if test "$want_clamuko" = "yes"; then
980
998
AC_DEFINE([CLAMUKO],1,[enable clamuko])
986
1004
if test "$have_pthreads" = "yes"; then
987
1005
THREAD_LIBS="-pthread"
988
1006
TH_SAFE="-thread-safe"
989
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
990
AC_DEFINE([_REENTRANT],1,[thread safe])
991
1007
if test "$want_clamuko" = "yes"; then
992
1008
AC_DEFINE([CLAMUKO],1,[enable clamuko])
1000
1016
CLAMD_LIBS="$CLAMD_LIBS -pthread"
1001
1017
CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -pthread"
1002
1018
TH_SAFE="-thread-safe"
1003
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
1004
AC_DEFINE([_REENTRANT],1,[thread safe])
1006
1020
AC_DEFINE([C_BSD],1,[os is OpenBSD])
1009
1023
if test "$have_pthreads" = "yes"; then
1010
1024
THREAD_LIBS="-pthread"
1011
1025
TH_SAFE="-thread-safe"
1012
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
1013
AC_DEFINE([_REENTRANT],1,[thread safe])
1015
1027
AC_DEFINE([C_BSD],1,[os is BSDI BSD/OS])
1018
1030
if test "$have_pthreads" = "yes"; then
1019
1031
THREAD_LIBS="-lpthread"
1020
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
1021
AC_DEFINE([_REENTRANT],1,[thread safe])
1023
1033
AC_DEFINE([C_BSD],1,[os is NetBSD])
1045
1055
if test "$have_pthreads" = "yes"; then
1046
1056
THREAD_LIBS="-lpthread"
1047
1057
TH_SAFE="-thread-safe"
1048
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
1049
AC_DEFINE([_REENTRANT],1,[thread safe])
1051
1059
AC_DEFINE([C_OS2],1,[os is OS/2])
1060
1068
if test "$have_pthreads" = "yes"; then
1061
1069
THREAD_LIBS="-lpthread"
1062
1070
TH_SAFE="-thread-safe"
1063
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
1064
AC_DEFINE([_REENTRANT],1,[thread safe])
1066
1072
AC_DEFINE([C_HPUX],1,[os is hpux])
1069
1075
if test "$have_pthreads" = "yes"; then
1070
1076
THREAD_LIBS="-lpthread"
1071
1077
TH_SAFE="-thread-safe"
1072
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
1073
AC_DEFINE([_REENTRANT],1,[thread safe])
1074
1078
AC_DEFINE([_THREAD_SAFE],1,[thread safe])
1076
1080
AC_DEFINE([C_AIX],1,[os is aix])
1079
1083
if test "$have_pthreads" = "yes"; then
1080
1084
THREAD_LIBS="-pthread"
1081
1085
TH_SAFE="-thread-safe"
1082
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
1083
AC_DEFINE([_REENTRANT],1,[thread safe])
1084
1086
AC_DEFINE([_POSIX_PII_SOCKET],1,[POSIX compatibility])
1086
1088
AC_DEFINE([C_OSF],1,[os is osf/tru64])
1089
if test "$have_pthreads" = "yes"; then
1090
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
1091
AC_DEFINE([_REENTRANT],1,[thread safe])
1093
1091
AC_DEFINE([C_QNX6],1,[os is QNX 6.x.x])
1096
1094
if test "$have_pthreads" = "yes"; then
1097
1095
THREAD_LIBS="-lpthread"
1098
1096
TH_SAFE="-thread-safe"
1099
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
1100
AC_DEFINE([_REENTRANT],1,[thread safe])
1102
1098
LIBS="$LIBS -lgen"
1103
1099
AC_DEFINE([C_IRIX],1,[os is irix])
1112
1108
if test "$have_pthreads" = "yes"; then
1113
1109
THREAD_LIBS="-lpthread"
1114
1110
TH_SAFE="-thread-safe"
1115
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
1116
AC_DEFINE([_REENTRANT],1,[thread safe])
1121
1115
if test "$have_pthreads" = "yes"; then
1122
1116
THREAD_LIBS="-lpthread"
1123
1117
TH_SAFE="-thread-safe"
1124
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
1125
AC_DEFINE([_REENTRANT],1,[thread safe])
1173
1165
AC_CHECK_FUNCS([sched_yield pthread_yield])
1174
1166
LIBS="$save_LIBS"
1175
1167
AC_DEFINE([BUILD_CLAMD], 1, "build clamd")
1168
dnl define these here, so we don't forget any system
1169
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
1170
AC_DEFINE([_REENTRANT],1,[thread safe])
1178
1173
dnl Check for readdir_r and number of its arguments
1611
1606
AC_CONFIG_SUBDIRS_OPTIONAL([libclamav/c++])
1609
AC_ARG_ENABLE([sha-collector-for-internal-use], [], [enable_sha_collector="yes"], [enable_sha_collector="no"])
1610
if test "$enable_sha_collector" != "no"; then
1611
AC_DEFINE([HAVE__INTERNAL__SHA_COLLECT], 1, [For internal use only - DO NOT DEFINE])
1613
AM_CONDITIONAL([BUILD_SHA1],[test "$enable_sha_collector" != "no"])
1615
1616
clamscan/Makefile
1616
1617
database/Makefile
1693
1695
AC_MSG_NOTICE([Summary of engine detection features])
1694
1696
CL_MSG_STATUS([autoit_ea06 ],[$have_autoitea06],[])
1695
CL_MSG_STATUS([bzip2 ],[$ac_cv_c_cve_2008_1372],[$want_bzip2])
1697
CL_MSG_STATUS([bzip2 ],[$bzip_check],[$want_bzip2])
1696
1698
CL_MSG_STATUS([zlib ],[$ZLIB_HOME],[yes])
1697
1699
CL_MSG_STATUS([unrar ],[$want_unrar],[$want_unrar])
1710
if test "x$cross_compiling" != "xno" || test "x$gcc_check" != "xyes" || test "x$zlib_check" = "xno" ; then
1712
if test "x$cross_compiling" != "xno" || test "x$gcc_check" != "xyes" || test "x$zlib_check" = "xno" || test "x$bzip_check" != "xok" ; then
1712
1714
****** WARNING:
1713
****** You are either cross compiling to a different host or
1714
****** you have manually disabled important configure checks.
1715
****** You are cross compiling to a different host or you are
1716
****** linking to bugged system libraries or you have manually
1717
****** disabled important configure checks.
1715
1718
****** Please be aware that this build may be badly broken.
1716
1719
****** DO NOT REPORT BUGS BASED ON THIS BUILD !!!