~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl   This program is free software; you can redistribute it and/or modify
 
2
dnl   it under the terms of the GNU General Public License as published by
 
3
dnl   the Free Software Foundation; either version 2 of the License, or
 
4
dnl   (at your option) any later version.
 
5
dnl
 
6
dnl   This program is distributed in the hope that it will be useful,
 
7
dnl   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
8
dnl   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
9
dnl   GNU General Public License for more details.
 
10
dnl
 
11
dnl   You should have received a copy of the GNU General Public License
 
12
dnl   along with this program; if not, write to the Free Software
 
13
dnl   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 
14
dnl   MA 02110-1301, USA.
 
15
 
 
16
AC_PREREQ([2.59])
 
17
AC_INIT([libclamavc++],[devel],[http://bugs.clamav.net])
 
18
AC_CONFIG_AUX_DIR([config])
 
19
AC_CONFIG_SRCDIR([llvm/configure])
 
20
AC_CONFIG_MACRO_DIR([m4])
 
21
AC_CONFIG_HEADER([clamavcxx-config.h])
 
22
AC_CANONICAL_TARGET
 
23
AM_INIT_AUTOMAKE([1.9 -Wall -Wportability -Werror foreign no-define color-tests tar-pax])
 
24
AM_SILENT_RULES([yes])
 
25
 
 
26
cxxset=${CXXFLAGS+set}
 
27
AC_PROG_CXX
 
28
 
 
29
if test "$cxxset" != set; then
 
30
# don't use the default -O2 -g because -g bloats the C++ binaries too much
 
31
  CXXFLAGS="-O2"
 
32
fi
 
33
 
 
34
AM_MAINTAINER_MODE
 
35
LT_INIT([disable-static])
 
36
if test "$GXX" != "yes"; then
 
37
    AC_MSG_ERROR([GNU C++ compiler not found, not building LLVM])
 
38
fi
 
39
 
 
40
AC_CHECK_GNU_MAKE
 
41
GMAKE="$llvm_cv_gnu_make_command"
 
42
AC_SUBST([GMAKE])
 
43
AC_CONFIG_SUBDIRS([llvm])
 
44
AC_ARG_ENABLE([llvm],AC_HELP_STRING([-enable-llvm],
 
45
                                    [Enable 'llvm' JIT/verifier support @<:@default=auto@:>@]),
 
46
                                    [enable_llvm=$enableval], [enable_llvm="auto"])
 
47
 
 
48
AC_ARG_ENABLE(optimized, AC_HELP_STRING([-enable-optimized],
 
49
              [Compile with optimizations enabled (default is YES)]),
 
50
              enable_optimized=$enableval, enable_optimized=default)
 
51
AM_CONDITIONAL(DEBUG_BUILD,[test "x$enable_optimized" == "xno"])
 
52
 
 
53
dnl Set configure args for subdir
 
54
if test "$enable_optimized" = "default"; then
 
55
    ac_configure_args="$ac_configure_args --enable-optimized"
 
56
fi
 
57
 
 
58
dnl Pretend that GNU make is available for LLVM, we don't use LLVM's buildsystem
 
59
dnl anyway (except for make check)
 
60
ac_configure_args="$ac_configure_args llvm_cv_gnu_make_command=make"
 
61
AC_ARG_ENABLE(all-jit-targets, AC_HELP_STRING([-enable-all-jit-targets],
 
62
              [Build all the targets that support JIT for testing (default NO)]),
 
63
              enable_alltargets=$enableval, enable_alltargets=no)
 
64
if test "$enable_alltargets" = "yes"; then
 
65
    new_args="$ac_configure_args --enable-targets=x86,powerpc,arm --enable-bindings=none --enable-libffi=no --without-llvmgcc --without-llvmgxx"
 
66
else
 
67
    new_args="$ac_configure_args --enable-targets=host-only --enable-bindings=none --enable-libffi=no --without-llvmgcc --without-llvmgxx"
 
68
fi
 
69
echo "$new_args"
 
70
ac_configure_args=`echo $new_args | sed -e 's/-Werror //g'`
 
71
echo "$ac_configure_args"
 
72
 
 
73
if test "$enable_llvm" = "auto"; then
 
74
    dnl Do some sanity checks, and don't automatically build on platforms
 
75
    dnl that are not supported or have broken compilers.
 
76
    dnl The user can override this by specifying --enable-llvm=yes.
 
77
    AC_MSG_CHECKING([for supported C++ compiler version])
 
78
    gxx_version=`${CXX} -dumpversion` ||
 
79
    AC_MSG_ERROR([Unable to get GNU C++ compiler version])
 
80
    case "${gxx_version}" in
 
81
     [[023]].*)
 
82
        AC_MSG_ERROR([C++ compiler too old (${gxx_version})])
 
83
        ;;
 
84
     4.0.1*|4.1.[[12]]*)
 
85
        AC_MSG_ERROR([C++ compiler is buggy])
 
86
        ;;
 
87
     *)
 
88
        AC_MSG_RESULT([ok (${gxx_version})])
 
89
    esac
 
90
 
 
91
    AC_MSG_CHECKING([for supported OS])
 
92
    case "$target_cpu" in
 
93
        i?86|amd64|x86_64|powerpc*)
 
94
            case "$target_os" in
 
95
                darwin*|freebsd*|openbsd*|netbsd*|dragonfly*|linux*|solaris*|win32*|mingw*)
 
96
                    AC_MSG_RESULT([ok ($target_cpu-$target_os)])
 
97
                    ;;
 
98
                *)
 
99
                    AC_MSG_ERROR([OS $target_os is not supported, not building LLVM])
 
100
                    ;;
 
101
            esac
 
102
            ;;
 
103
        alpha*|arm*)
 
104
            AC_MSG_ERROR([CPU support is untested, not building LLVM])
 
105
            ;;
 
106
        *)
 
107
            AC_MSG_ERROR([Unsupported CPU for JIT: $target_cpu, not building LLVM])
 
108
            ;;
 
109
    esac
 
110
fi
 
111
 
 
112
build_x86=no
 
113
build_ppc=no
 
114
build_arm=no
 
115
case "$target_cpu" in
 
116
    i?86|amd64|x86_64)
 
117
            build_x86=yes
 
118
            ;;
 
119
    powerpc*)
 
120
            build_ppc=yes
 
121
            ;;
 
122
    arm*)
 
123
            build_arm=yes
 
124
            ;;
 
125
esac
 
126
 
 
127
# FreeBSD is only one which needs something else than -pthread,
 
128
# according to the logic in ClamAV's main configure.in.
 
129
case "$target_os" in
 
130
freebsd[[45]]*)
 
131
    THREAD_LIBS="-pthread -lc_r"
 
132
    ;;
 
133
freebsd*)
 
134
    THREAD_LIBS="-lthr"
 
135
    ;;
 
136
*)
 
137
    THREAD_LIBS="-pthread"
 
138
esac
 
139
AC_SUBST([THREAD_LIBS])
 
140
 
 
141
if test "$enable_alltargets" = "yes"; then
 
142
        build_x86=yes
 
143
        build_ppc=yes
 
144
        build_arm=yes
 
145
fi
 
146
AM_CONDITIONAL(BUILD_X86, [test "$build_x86" = "yes"])
 
147
AM_CONDITIONAL(BUILD_PPC, [test "$build_ppc" = "yes"])
 
148
AM_CONDITIONAL(BUILD_ARM, [test "$build_arm" = "yes"])
 
149
 
 
150
AC_OUTPUT([
 
151
    Makefile
 
152
])