... | ... |
@@ -913,6 +913,7 @@ enable_clamdtop |
913 | 913 |
with_libncurses_prefix |
914 | 914 |
with_libpdcurses_prefix |
915 | 915 |
enable_distcheck_werror |
916 |
+with_system_llvm |
|
916 | 917 |
enable_llvm |
917 | 918 |
enable_sha_collector_for_internal_use |
918 | 919 |
with_libcurl |
... | ... |
@@ -1624,6 +1625,9 @@ Optional Packages: |
1624 | 1624 |
--without-libncurses-prefix don't search for libncurses in includedir and libdir |
1625 | 1625 |
--with-libpdcurses-prefix[=DIR] search for libpdcurses in DIR/include and DIR/lib |
1626 | 1626 |
--without-libpdcurses-prefix don't search for libpdcurses in includedir and libdir |
1627 |
+ --with-system-llvm Use system llvm instead of built-in, uses full path |
|
1628 |
+ to llvm-config (default= /usr/local or /usr if not |
|
1629 |
+ found in /usr/local) |
|
1627 | 1630 |
--with-libcurl=DIR path to directory containing libcurl (default= |
1628 | 1631 |
/usr/local or /usr if not found in /usr/local) |
1629 | 1632 |
|
... | ... |
@@ -22324,11 +22328,36 @@ fi |
22324 | 22324 |
|
22325 | 22325 |
|
22326 | 22326 |
|
22327 |
+ |
|
22328 |
+# Check whether --with-system-llvm was given. |
|
22329 |
+if test "${with_system_llvm+set}" = set; then : |
|
22330 |
+ withval=$with_system_llvm; case "$withval" in |
|
22331 |
+ yes) |
|
22332 |
+ system_llvm="default" |
|
22333 |
+ ;; |
|
22334 |
+ no) |
|
22335 |
+ system_llvm="built-in" |
|
22336 |
+ ;; |
|
22337 |
+ *) |
|
22338 |
+ system_llvm=$withval |
|
22339 |
+ esac |
|
22340 |
+ |
|
22341 |
+else |
|
22342 |
+ system_llvm="built-in" |
|
22343 |
+fi |
|
22344 |
+ |
|
22345 |
+ |
|
22327 | 22346 |
# Check whether --enable-llvm was given. |
22328 | 22347 |
if test "${enable_llvm+set}" = set; then : |
22329 | 22348 |
enableval=$enable_llvm; enable_llvm=$enableval |
22330 | 22349 |
else |
22331 |
- enable_llvm="auto" |
|
22350 |
+ |
|
22351 |
+if test "x$system_llvm" != "xbuilt-in"; then |
|
22352 |
+ enable_llvm="yes" |
|
22353 |
+else |
|
22354 |
+ enable_llvm="auto" |
|
22355 |
+fi |
|
22356 |
+ |
|
22332 | 22357 |
fi |
22333 | 22358 |
|
22334 | 22359 |
|
... | ... |
@@ -22344,6 +22373,8 @@ subdirs="$subdirs libclamav/c++" |
22344 | 22344 |
|
22345 | 22345 |
|
22346 | 22346 |
|
22347 |
+else |
|
22348 |
+ system_llvm="none" |
|
22347 | 22349 |
fi |
22348 | 22350 |
|
22349 | 22351 |
# Check whether --enable-sha-collector-for-internal-use was given. |
... | ... |
@@ -27974,15 +28005,15 @@ if test "$subdirfailed" = "no"; then |
27974 | 27974 |
fi |
27975 | 27975 |
|
27976 | 27976 |
|
27977 |
- $as_echo_n " jit : " |
|
27977 |
+ $as_echo_n " llvm : " |
|
27978 | 27978 |
if test "x$enable_llvm" = "xno"; then : |
27979 |
- $as_echo "$have_jit (disabled)" |
|
27979 |
+ $as_echo "$have_jit, from $system_llvm (disabled)" |
|
27980 | 27980 |
elif test "x$enable_llvm" = "xyes"; then : |
27981 |
- $as_echo "$have_jit" |
|
27981 |
+ $as_echo "$have_jit, from $system_llvm" |
|
27982 | 27982 |
elif test "x$enable_llvm" = "x"; then : |
27983 |
- $as_echo "$have_jit" |
|
27983 |
+ $as_echo "$have_jit, from $system_llvm" |
|
27984 | 27984 |
else |
27985 |
- $as_echo "$have_jit ($enable_llvm)" |
|
27985 |
+ $as_echo "$have_jit, from $system_llvm ($enable_llvm)" |
|
27986 | 27986 |
fi |
27987 | 27987 |
|
27988 | 27988 |
|
... | ... |
@@ -5750,8 +5750,8 @@ maintainer-clean-generic: |
5750 | 5750 |
@echo "This command is intended for maintainers to use" |
5751 | 5751 |
@echo "it deletes files that may require special tools to rebuild." |
5752 | 5752 |
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) |
5753 |
-@BUILD_EXTERNAL_LLVM_TRUE@distclean-local: |
|
5754 | 5753 |
@BUILD_EXTERNAL_LLVM_TRUE@clean-local: |
5754 |
+@BUILD_EXTERNAL_LLVM_TRUE@distclean-local: |
|
5755 | 5755 |
clean: clean-am |
5756 | 5756 |
|
5757 | 5757 |
clean-am: clean-generic clean-libtool clean-local \ |
... | ... |
@@ -1463,8 +1463,9 @@ Optional Packages: |
1463 | 1463 |
--with-gnu-ld assume the C compiler uses GNU ld [default=no] |
1464 | 1464 |
--with-sysroot=DIR Search for dependent libraries within DIR |
1465 | 1465 |
(or the compiler's sysroot if not specified). |
1466 |
- -with-system-llvm Use system llvm instead of built-in, requires full |
|
1467 |
- path to llvm-config |
|
1466 |
+ --with-system-llvm Use system llvm instead of built-in, uses full path |
|
1467 |
+ to llvm-config (default= search /usr/local or /usr |
|
1468 |
+ if not found in /usr/local) |
|
1468 | 1469 |
--with-libjson=DIR path to directory containing libjson (default= |
1469 | 1470 |
/usr/local or /usr if not found in /usr/local) |
1470 | 1471 |
|
... | ... |
@@ -15606,31 +15607,43 @@ llvmconfig= |
15606 | 15606 |
if test "${with_system_llvm+set}" = set; then : |
15607 | 15607 |
withval=$with_system_llvm; case "$withval" in |
15608 | 15608 |
yes) |
15609 |
- as_fn_error $? "--with-system-llvm needs full path to llvm-config" "$LINENO" 5 |
|
15610 |
- ;; |
|
15609 |
+ llvmconfig="/usr/local/bin/llvm-config" |
|
15610 |
+ if test ! -x "$llvmconfig"; then |
|
15611 |
+ llvmconfig="/usr/bin/llvm-config" |
|
15612 |
+ if test ! -x "$llvmconfig"; then |
|
15613 |
+ as_fn_error $? "llvm-config cannot be found within defaults" "$LINENO" 5 |
|
15614 |
+ fi |
|
15615 |
+ fi |
|
15616 |
+ ;; |
|
15611 | 15617 |
no) ;; |
15612 | 15618 |
*) |
15613 |
- llvmconfig="$withval" |
|
15614 |
- llvmver=`$llvmconfig --version` |
|
15619 |
+ llvmconfig="$withval" |
|
15620 |
+ if test ! -x "$llvmconfig"; then |
|
15621 |
+ as_fn_error $? "llvm-config does not exist at $llvmconfig" "$LINENO" 5 |
|
15622 |
+ fi |
|
15623 |
+ ;; |
|
15624 |
+ esac |
|
15625 |
+ |
|
15626 |
+ if test "x$llvmconfig" != "x"; then |
|
15627 |
+ llvmver=`$llvmconfig --version` |
|
15615 | 15628 |
|
15616 |
- LLVMCONFIG_CXXFLAGS=`$llvmconfig --cxxflags` |
|
15629 |
+ LLVMCONFIG_CXXFLAGS=`$llvmconfig --cxxflags` |
|
15617 | 15630 |
|
15618 |
- LLVMCONFIG_LDFLAGS=`$llvmconfig --ldflags` |
|
15631 |
+ LLVMCONFIG_LDFLAGS=`$llvmconfig --ldflags` |
|
15619 | 15632 |
|
15620 |
- LLVMCONFIG_LIBS=`$llvmconfig --libs jit nativecodegen scalaropts ipo` |
|
15633 |
+ LLVMCONFIG_LIBS=`$llvmconfig --libs jit nativecodegen scalaropts ipo` |
|
15621 | 15634 |
|
15622 |
- LLVMCONFIG_LIBFILES=`$llvmconfig --libfiles jit nativecodegen scalaropts ipo` |
|
15635 |
+ LLVMCONFIG_LIBFILES=`$llvmconfig --libfiles jit nativecodegen scalaropts ipo` |
|
15623 | 15636 |
|
15624 |
- { $as_echo "$as_me:${as_lineno-$LINENO}: Using external LLVM" >&5 |
|
15637 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Using external LLVM" >&5 |
|
15625 | 15638 |
$as_echo "$as_me: Using external LLVM" >&6;} |
15626 |
- { $as_echo "$as_me:${as_lineno-$LINENO}: CXXFLAGS from llvm-config: $LLVMCONFIG_CXXFLAGS" >&5 |
|
15639 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: CXXFLAGS from llvm-config: $LLVMCONFIG_CXXFLAGS" >&5 |
|
15627 | 15640 |
$as_echo "$as_me: CXXFLAGS from llvm-config: $LLVMCONFIG_CXXFLAGS" >&6;} |
15628 |
- { $as_echo "$as_me:${as_lineno-$LINENO}: LDFLAGS from llvm-config: $LLVMCONFIG_LDFLAGS" >&5 |
|
15641 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: LDFLAGS from llvm-config: $LLVMCONFIG_LDFLAGS" >&5 |
|
15629 | 15642 |
$as_echo "$as_me: LDFLAGS from llvm-config: $LLVMCONFIG_LDFLAGS" >&6;} |
15630 |
- { $as_echo "$as_me:${as_lineno-$LINENO}: LIBS from llvm-config: $LLVMCONFIG_LIBS" >&5 |
|
15643 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: LIBS from llvm-config: $LLVMCONFIG_LIBS" >&5 |
|
15631 | 15644 |
$as_echo "$as_me: LIBS from llvm-config: $LLVMCONFIG_LIBS" >&6;} |
15632 |
- ;; |
|
15633 |
- esac |
|
15645 |
+ fi |
|
15634 | 15646 |
|
15635 | 15647 |
fi |
15636 | 15648 |
|