~ubuntu-branches/ubuntu/jaunty/clamav/jaunty-backports

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-10-02 15:36:00 UTC
  • mfrom: (10.1.6 sid)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20101002153600-2tx3vki1u55cdrjy
Tags: 0.96.3+dfsg-2ubuntu0.10.04.1
Microversion update to 0.96.3 for Lucid (LP: #653738)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
AC_PREREQ([2.59])
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/])
24
24
 
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])
43
43
 
44
44
dnl change this on a release
45
 
dnl VERSION="devel-`date +%Y%m%d`"
46
 
VERSION="0.96"
 
45
VERSION="0.96.3"
47
46
AC_DEFINE_UNQUOTED([VERSION],"$VERSION",[Version number of package])
48
47
 
49
48
LC_CURRENT=7
50
 
LC_REVISION=2
 
49
LC_REVISION=5
51
50
LC_AGE=1
52
51
LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
53
52
AC_SUBST([LIBCLAMAV_VERSION])
78
77
AC_C_INLINE
79
78
AC_C_FPU_BIGENDIAN
80
79
AC_C_BIGENDIAN
81
 
if test $ac_cv_c_bigendian = no; then
82
 
    m4_default([], [AC_DEFINE([WORDS_BIGENDIAN], 0)])
83
 
fi
84
80
 
85
81
LT_LIB_M
86
82
 
430
426
  VERSION_SUFFIX="$VERSION_SUFFIX-exp"
431
427
fi
432
428
 
 
429
build_configure_args=`echo "$ac_configure_args" | sed -e 's/[\"]//g'`
 
430
AC_SUBST([BUILD_CONFIGURE_FLAGS], [$build_configure_args])
 
431
 
 
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")])
435
435
 
570
570
[  --disable-bzip2        disable bzip2 support],
571
571
want_bzip2=$enableval, want_bzip2="yes")
572
572
 
 
573
bzip_check="ok"
573
574
if test "$want_bzip2" = "yes"
574
575
then
575
576
    AC_LIB_LINKFLAGS([bz2])
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)"
594
596
        fi
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)"
602
605
        fi
603
606
 
604
607
        case "$ac_cv_c_cve_2008_1372" in
605
608
        ok|bugged|linkfailed)
 
609
                ;;
 
610
        *)
 
611
                HAVE_LIBBZ2=no
 
612
                ;;
 
613
        esac
 
614
    fi
 
615
 
 
616
    if test "$HAVE_LIBBZ2" = "yes"; then
 
617
        AC_C_CVE_2010_0405
 
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)"
 
623
        fi
 
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)"
 
632
        fi
 
633
 
 
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])
608
638
                ;;
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])
833
 
else
834
 
  AC_DEFINE([CL_BCUNSIGNED],1,[disable loading of unsigned bytecode])
835
863
fi
836
864
 
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])
934
960
        fi
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])
946
970
       fi
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])
958
980
    fi
959
981
    AC_DEFINE([C_SOLARIS],1,[os is solaris])
960
982
    ;;
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])
969
989
        fi
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])
981
999
        fi
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])
993
1009
        fi
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])
1005
1019
    fi
1006
1020
    AC_DEFINE([C_BSD],1,[os is OpenBSD])
1007
1021
    ;;
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])
1014
1026
    fi
1015
1027
    AC_DEFINE([C_BSD],1,[os is BSDI BSD/OS])
1016
1028
    ;;
1017
1029
netbsd*)
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])
1022
1032
     fi
1023
1033
    AC_DEFINE([C_BSD],1,[os is NetBSD])
1024
1034
    ;;
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])
1050
1058
    fi
1051
1059
    AC_DEFINE([C_OS2],1,[os is OS/2])
1052
1060
    ;;
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])
1065
1071
    fi
1066
1072
    AC_DEFINE([C_HPUX],1,[os is hpux])
1067
1073
    ;;
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])
1075
1079
    fi
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])
1085
1087
    fi
1086
1088
    AC_DEFINE([C_OSF],1,[os is osf/tru64])
1087
1089
    ;;
1088
1090
nto-qnx*)
1089
 
     if test "$have_pthreads" = "yes"; then
1090
 
       AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
1091
 
       AC_DEFINE([_REENTRANT],1,[thread safe])
1092
 
     fi
1093
1091
    AC_DEFINE([C_QNX6],1,[os is QNX 6.x.x])
1094
1092
    ;;
1095
1093
irix*)
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])
1101
1097
    fi
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])
1117
1111
    fi
1118
1112
    ;;
1119
1113
gnu*)
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])
1126
1118
    fi
1127
1119
    ;;
1128
1120
*)
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])
1176
1171
fi
1177
1172
 
1178
1173
dnl Check for readdir_r and number of its arguments
1611
1606
    AC_CONFIG_SUBDIRS_OPTIONAL([libclamav/c++])
1612
1607
fi
1613
1608
 
 
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])
 
1612
fi
 
1613
AM_CONDITIONAL([BUILD_SHA1],[test "$enable_sha_collector" != "no"])
 
1614
 
1614
1615
AC_OUTPUT([
1615
1616
clamscan/Makefile
1616
1617
database/Makefile
1631
1632
libclamav.pc
1632
1633
platform.h
1633
1634
docs/man/clamav-milter.8
 
1635
docs/man/clamav-milter.conf.5
1634
1636
docs/man/clamconf.1
1635
1637
docs/man/clamd.8
1636
1638
docs/man/clamd.conf.5
1692
1694
 
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])
1698
1700
 
1707
1709
])
1708
1710
fi
1709
1711
 
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
1711
1713
AC_MSG_WARN([
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 !!!
1717
1720
])