~ubuntu-branches/ubuntu/trusty/clamav/trusty-updates

« back to all changes in this revision

Viewing changes to .pc/0018-llvm-don-t-use-system-libs.patch/libclamav/c++/configure.ac

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-05-04 15:47:25 UTC
  • mfrom: (0.47.12)
  • Revision ID: package-import@ubuntu.com-20150504154725-5ka5jkhjln6f22vv
Tags: 0.98.7+dfsg-0ubuntu0.14.04.1
* Updated to 0.98.7 to fix multiple issues
  - CVE-2015-2170
  - CVE-2015-2221
  - CVE-2015-2222
  - CVE-2015-2305
  - CVE-2015-2668
* Refreshed patches for 0.98.7:
  - d/p/0010-hardcode-LLVM-linker-flag-because-llvm-config-return.patch
  - d/p/0018-llvm-don-t-use-system-libs.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
AC_PREREQ([2.59])
17
17
AC_INIT([libclamavc++],[devel],[http://bugs.clamav.net])
18
18
AC_CONFIG_AUX_DIR([config])
19
 
AC_CONFIG_SRCDIR([llvm/configure])
20
19
AC_CONFIG_MACRO_DIR([m4])
21
20
AC_CONFIG_HEADER([clamavcxx-config.h])
22
21
AC_CANONICAL_TARGET
78
77
 fi
79
78
])
80
79
 
 
80
llvm_linking=
 
81
AC_ARG_WITH([llvm-linking], [AC_HELP_STRING([--with-llvm-linking],
 
82
[specifies method to linking llvm @<:@static|dynamic@:>@, only valid with --with-system-llvm])],
 
83
[
 
84
if test "x$llvmconfig" = "x"; then
 
85
   AC_MSG_ERROR([Failed to configure LLVM, and LLVM linking was specified without valid llvm-config])  
 
86
else
 
87
case "$withval" in
 
88
  static)
 
89
    llvm_linking="static"
 
90
    ;;
 
91
  dynamic)
 
92
    llvm_linking="dynamic"
 
93
    ;;
 
94
  *)
 
95
    AC_MSG_ERROR([Invalid argument to --with-llvm-linking])
 
96
esac
 
97
fi
 
98
], [])
 
99
 
81
100
AC_MSG_CHECKING([for supported LLVM version])
82
101
if test "x$llvmconfig" = "x"; then
83
102
    dnl macro not available in older autotools
113
132
dnl aquire the required flags to properly link in external LLVM
114
133
if test "x$llvmconfig" != "x"; then
115
134
    AC_SUBST(LLVMCONFIG_CXXFLAGS, [`$llvmconfig --cxxflags`])
116
 
    if test $llvmver_test -ge 350; then
117
 
        dnl LLVM 3.5.0 and after splits linker flags into two sets
118
 
        ldflags=`$llvmconfig --ldflags`
119
 
        syslibs=`$llvmconfig --system-libs`
120
 
        AC_SUBST(LLVMCONFIG_LDFLAGS, ["$ldflags $syslibs"])
 
135
 
 
136
    if test "x$llvm_linking" = "xdynamic"; then
 
137
        AC_SUBST(LLVMCONFIG_LDFLAGS, [`$llvmconfig --ldflags`])
 
138
        AC_SUBST(LLVMCONFIG_LIBS, [-lLLVM-$llvmver])
 
139
        AC_SUBST(LLVMCONFIG_LIBFILES, [])
121
140
    else
122
 
        AC_SUBST(LLVMCONFIG_LDFLAGS, [`$llvmconfig --ldflags`])
 
141
        if test $llvmver_test -ge 350; then
 
142
           dnl LLVM 3.5.0 and after splits linker flags into two sets
 
143
           ldflags=`$llvmconfig --ldflags`
 
144
           syslibs=`$llvmconfig --system-libs`
 
145
           AC_SUBST(LLVMCONFIG_LDFLAGS, ["$ldflags $syslibs"])
 
146
        else
 
147
           AC_SUBST(LLVMCONFIG_LDFLAGS, [`$llvmconfig --ldflags`])
 
148
        fi
 
149
        AC_SUBST(LLVMCONFIG_LIBS, [`$llvmconfig --libs jit nativecodegen scalaropts ipo`])
 
150
        AC_SUBST(LLVMCONFIG_LIBFILES, [`$llvmconfig --libfiles jit nativecodegen scalaropts ipo`])
123
151
    fi
 
152
 
124
153
    AC_SUBST(LLVMCONFIG_LIBS, [-lLLVM-$llvmver])
125
154
    AC_SUBST(LLVMCONFIG_LIBFILES, [])
 
155
 
126
156
    AC_MSG_NOTICE([CXXFLAGS from llvm-config: $LLVMCONFIG_CXXFLAGS])
127
157
    AC_MSG_NOTICE([LDFLAGS from llvm-config: $LLVMCONFIG_LDFLAGS])
128
158
    AC_MSG_NOTICE([LIBS from llvm-config: $LLVMCONFIG_LIBS])