Browse code

autoreconf

Kevin Lin authored on 2016/05/03 04:48:33
Showing 22 changed files
... ...
@@ -190,6 +190,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
190 190
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
191 191
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
192 192
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
193
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
193 194
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
194 195
 	$(top_srcdir)/m4/reorganization/yara.m4 \
195 196
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -522,6 +523,7 @@ infodir = @infodir@
522 522
 install_sh = @install_sh@
523 523
 libdir = @libdir@
524 524
 libexecdir = @libexecdir@
525
+llvmconfig = @llvmconfig@
525 526
 localedir = @localedir@
526 527
 localstatedir = @localstatedir@
527 528
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -165,6 +165,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
166 166
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
167 167
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
168
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
168 169
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
169 170
 	$(top_srcdir)/m4/reorganization/yara.m4 \
170 171
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -476,6 +477,7 @@ infodir = @infodir@
476 476
 install_sh = @install_sh@
477 477
 libdir = @libdir@
478 478
 libexecdir = @libexecdir@
479
+llvmconfig = @llvmconfig@
479 480
 localedir = @localedir@
480 481
 localstatedir = @localstatedir@
481 482
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -146,6 +146,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
146 146
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
147 147
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
148 148
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
149
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
149 150
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
150 151
 	$(top_srcdir)/m4/reorganization/yara.m4 \
151 152
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -412,6 +413,7 @@ infodir = @infodir@
412 412
 install_sh = @install_sh@
413 413
 libdir = @libdir@
414 414
 libexecdir = @libexecdir@
415
+llvmconfig = @llvmconfig@
415 416
 localedir = @localedir@
416 417
 localstatedir = @localstatedir@
417 418
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -164,6 +164,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
166 166
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
167
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
167 168
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
168 169
 	$(top_srcdir)/m4/reorganization/yara.m4 \
169 170
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -430,6 +431,7 @@ infodir = @infodir@
430 430
 install_sh = @install_sh@
431 431
 libdir = @libdir@
432 432
 libexecdir = @libexecdir@
433
+llvmconfig = @llvmconfig@
433 434
 localedir = @localedir@
434 435
 localstatedir = @localstatedir@
435 436
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -166,6 +166,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
166 166
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
167 167
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
168 168
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
169
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
169 170
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
170 171
 	$(top_srcdir)/m4/reorganization/yara.m4 \
171 172
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -479,6 +480,7 @@ infodir = @infodir@
479 479
 install_sh = @install_sh@
480 480
 libdir = @libdir@
481 481
 libexecdir = @libexecdir@
482
+llvmconfig = @llvmconfig@
482 483
 localedir = @localedir@
483 484
 localstatedir = @localstatedir@
484 485
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -164,6 +164,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
166 166
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
167
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
167 168
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
168 169
 	$(top_srcdir)/m4/reorganization/yara.m4 \
169 170
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -441,6 +442,7 @@ infodir = @infodir@
441 441
 install_sh = @install_sh@
442 442
 libdir = @libdir@
443 443
 libexecdir = @libexecdir@
444
+llvmconfig = @llvmconfig@
444 445
 localedir = @localedir@
445 446
 localstatedir = @localstatedir@
446 447
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -146,6 +146,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
146 146
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
147 147
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
148 148
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
149
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
149 150
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
150 151
 	$(top_srcdir)/m4/reorganization/yara.m4 \
151 152
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -447,6 +448,7 @@ infodir = @infodir@
447 447
 install_sh = @install_sh@
448 448
 libdir = @libdir@
449 449
 libexecdir = @libexecdir@
450
+llvmconfig = @llvmconfig@
450 451
 localedir = @localedir@
451 452
 localstatedir = @localstatedir@
452 453
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -165,6 +165,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
166 166
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
167 167
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
168
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
168 169
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
169 170
 	$(top_srcdir)/m4/reorganization/yara.m4 \
170 171
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -432,6 +433,7 @@ infodir = @infodir@
432 432
 install_sh = @install_sh@
433 433
 libdir = @libdir@
434 434
 libexecdir = @libexecdir@
435
+llvmconfig = @llvmconfig@
435 436
 localedir = @localedir@
436 437
 localstatedir = @localstatedir@
437 438
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -164,6 +164,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
166 166
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
167
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
167 168
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
168 169
 	$(top_srcdir)/m4/reorganization/yara.m4 \
169 170
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -430,6 +431,7 @@ infodir = @infodir@
430 430
 install_sh = @install_sh@
431 431
 libdir = @libdir@
432 432
 libexecdir = @libexecdir@
433
+llvmconfig = @llvmconfig@
433 434
 localedir = @localedir@
434 435
 localstatedir = @localstatedir@
435 436
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -685,6 +685,7 @@ ENABLE_LIBFRESHCLAM_FALSE
685 685
 ENABLE_LIBFRESHCLAM_TRUE
686 686
 HAVE_YARA
687 687
 subdirs
688
+llvmconfig
688 689
 WERR_CFLAGS_MILTER
689 690
 WERR_CFLAGS
690 691
 HAVE_CURSES_FALSE
... ...
@@ -939,9 +940,9 @@ enable_clamdtop
939 939
 with_libncurses_prefix
940 940
 with_libpdcurses_prefix
941 941
 enable_distcheck_werror
942
+enable_llvm
942 943
 with_system_llvm
943 944
 with_llvm_linking
944
-enable_llvm
945 945
 enable_sha_collector_for_internal_use
946 946
 enable_yara
947 947
 enable_libfreshclam
... ...
@@ -1680,9 +1681,9 @@ Optional Packages:
1680 1680
   --without-libncurses-prefix     don't search for libncurses in includedir and libdir
1681 1681
   --with-libpdcurses-prefix[=DIR]  search for libpdcurses in DIR/include and DIR/lib
1682 1682
   --without-libpdcurses-prefix     don't search for libpdcurses in includedir and libdir
1683
-  --with-system-llvm      use system llvm instead of built-in, uses full path
1684
-                          to llvm-config [default=/usr/local or /usr if not
1685
-                          found in /usr/local]
1683
+  --with-system-llvm      Specify system llvm location or to use old package,
1684
+                          uses full path to llvm-config or bin directory
1685
+                          (default=search PATH environment variable)
1686 1686
   --with-llvm-linking     specifies method to linking llvm [static|dynamic],
1687 1687
                           only valid with --with-system-llvm
1688 1688
   --with-libcurl[=DIR]    path to directory containing libcurl
... ...
@@ -23931,67 +23932,168 @@ fi
23931 23931
 
23932 23932
 
23933 23933
 
23934
+# Check whether --enable-llvm was given.
23935
+if test "${enable_llvm+set}" = set; then :
23936
+  enableval=$enable_llvm; enable_llvm=$enableval
23937
+else
23938
+  enable_llvm="auto"
23939
+fi
23940
+
23941
+
23942
+if test "$enable_llvm" != "no"; then
23943
+
23944
+
23934 23945
 # Check whether --with-system-llvm was given.
23935 23946
 if test "${with_system_llvm+set}" = set; then :
23936
-  withval=$with_system_llvm; case "$withval" in
23947
+  withval=$with_system_llvm; system_llvm=$withval; if test "$enable_llvm" = "auto"; then enable_llvm="yes"; fi
23948
+else
23949
+  system_llvm="yes"
23950
+fi
23951
+
23952
+
23953
+case "$system_llvm" in
23937 23954
   yes)
23938
-    system_llvm="default"
23939
-    ;;
23940
-  no)
23941
-    system_llvm="built-in"
23942
-    ;;
23955
+     # Extract the first word of "llvm-config", so it can be a program name with args.
23956
+set dummy llvm-config; ac_word=$2
23957
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23958
+$as_echo_n "checking for $ac_word... " >&6; }
23959
+if ${ac_cv_path_llvmconfig+:} false; then :
23960
+  $as_echo_n "(cached) " >&6
23961
+else
23962
+  case $llvmconfig in
23963
+  [\\/]* | ?:[\\/]*)
23964
+  ac_cv_path_llvmconfig="$llvmconfig" # Let the user override the test with a path.
23965
+  ;;
23943 23966
   *)
23944
-    system_llvm=$withval
23945
- esac
23967
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23968
+for as_dir in $PATH
23969
+do
23970
+  IFS=$as_save_IFS
23971
+  test -z "$as_dir" && as_dir=.
23972
+    for ac_exec_ext in '' $ac_executable_extensions; do
23973
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23974
+    ac_cv_path_llvmconfig="$as_dir/$ac_word$ac_exec_ext"
23975
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23976
+    break 2
23977
+  fi
23978
+done
23979
+  done
23980
+IFS=$as_save_IFS
23946 23981
 
23982
+  ;;
23983
+esac
23984
+fi
23985
+llvmconfig=$ac_cv_path_llvmconfig
23986
+if test -n "$llvmconfig"; then
23987
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llvmconfig" >&5
23988
+$as_echo "$llvmconfig" >&6; }
23947 23989
 else
23948
-  system_llvm="built-in"
23990
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23991
+$as_echo "no" >&6; }
23949 23992
 fi
23950 23993
 
23951 23994
 
23952
-
23953
-# Check whether --with-llvm-linking was given.
23954
-if test "${with_llvm_linking+set}" = set; then :
23955
-  withval=$with_llvm_linking;
23956
-if test "x$system_llvm" = "xbuilt-in"; then
23957
-   as_fn_error $? "Failed to configure LLVM, and LLVM linking was specified without specifying system-llvm" "$LINENO" 5
23995
+     if test "x$llvmconfig" = "x"; then
23996
+         llvmoptserrmsg="llvm-config cannot be found within PATH"
23997
+     fi
23998
+     ;;
23999
+  no) ;;
24000
+  *)
24001
+     if test -d "$withval"; then
24002
+         # Extract the first word of "llvm-config", so it can be a program name with args.
24003
+set dummy llvm-config; ac_word=$2
24004
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24005
+$as_echo_n "checking for $ac_word... " >&6; }
24006
+if ${ac_cv_path_llvmconfig+:} false; then :
24007
+  $as_echo_n "(cached) " >&6
23958 24008
 else
23959
-case "$withval" in
23960
-  static)
23961
-    llvm_linking="static"
23962
-    ;;
23963
-  dynamic)
23964
-    llvm_linking="dynamic"
23965
-    ;;
24009
+  case $llvmconfig in
24010
+  [\\/]* | ?:[\\/]*)
24011
+  ac_cv_path_llvmconfig="$llvmconfig" # Let the user override the test with a path.
24012
+  ;;
23966 24013
   *)
23967
-    as_fn_error $? "Invalid argument to --with-llvm-linking" "$LINENO" 5
24014
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24015
+for as_dir in $withval/bin
24016
+do
24017
+  IFS=$as_save_IFS
24018
+  test -z "$as_dir" && as_dir=.
24019
+    for ac_exec_ext in '' $ac_executable_extensions; do
24020
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24021
+    ac_cv_path_llvmconfig="$as_dir/$ac_word$ac_exec_ext"
24022
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24023
+    break 2
24024
+  fi
24025
+done
24026
+  done
24027
+IFS=$as_save_IFS
24028
+
24029
+  ;;
23968 24030
 esac
23969 24031
 fi
23970
-
24032
+llvmconfig=$ac_cv_path_llvmconfig
24033
+if test -n "$llvmconfig"; then
24034
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llvmconfig" >&5
24035
+$as_echo "$llvmconfig" >&6; }
23971 24036
 else
24037
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24038
+$as_echo "no" >&6; }
24039
+fi
23972 24040
 
23973
-if test "x$system_llvm" = "xbuilt-in"; then
23974
-   llvm_linking=""
23975
-else
23976
-   llvm_linking="auto"
24041
+
24042
+     else
24043
+         llvmconfig=$withval
24044
+         if test ! -x "$llvmconfig"; then
24045
+             llvmconfig=""
24046
+         fi
24047
+     fi
24048
+
24049
+     if test "x$llvmconfig" = "x"; then
24050
+         llvmoptserrmsg="llvm-config does not exist at $withval"
24051
+     fi
24052
+     ;;
24053
+esac
24054
+
24055
+if test "x$llvmconfig" != "x"; then
24056
+
24057
+
24058
+# Check whether --with-llvm-linking was given.
24059
+if test "${with_llvm_linking+set}" = set; then :
24060
+  withval=$with_llvm_linking; if test "x$llvmconfig" = "x"; then
24061
+   as_fn_error $? "Failed to configure LLVM, and LLVM linking was specified without valid llvm-config" "$LINENO" 5
24062
+else
24063
+   case "$withval" in
24064
+     static)
24065
+         llvm_linking="static"
24066
+         ;;
24067
+     dynamic)
24068
+         llvm_linking="dynamic"
24069
+         ;;
24070
+     *)
24071
+         as_fn_error $? "Invalid argument to --with-llvm-linking" "$LINENO" 5
24072
+   esac
23977 24073
 fi
23978 24074
 
24075
+else
24076
+  llvm_linking=""
23979 24077
 fi
23980 24078
 
23981 24079
 
23982
-# Check whether --enable-llvm was given.
23983
-if test "${enable_llvm+set}" = set; then :
23984
-  enableval=$enable_llvm; enable_llvm=$enableval
23985
-else
24080
+llvmver=`$llvmconfig --version`
23986 24081
 
23987
-if test "x$system_llvm" != "xbuilt-in"; then
23988
-    enable_llvm="yes"
23989 24082
 else
23990
-    enable_llvm="auto"
23991
-fi
24083
+llvmver="2.8"
24084
+system_llvm="internal"
23992 24085
 
23993 24086
 fi
24087
+fi
23994 24088
 
24089
+if test "x$llvmoptserrmsg" != "x"; then
24090
+    if test "$enable_llvm" = "auto"; then
24091
+        enable_llvm="no"
24092
+    else
24093
+        as_fn_error $? "Failed to configure LLVM, and LLVM was explicitly requested" "$LINENO" 5
24094
+            fi
24095
+fi
23995 24096
 
23996 24097
 if test "$enable_llvm" != "no"; then
23997 24098
 
... ...
@@ -29559,18 +29661,32 @@ have_jit="no"
29559 29559
 if test "$subdirfailed" = "no"; then
29560 29560
     have_jit="yes"
29561 29561
 fi
29562
-if test "x$llvm_linking" = "x"; then
29562
+if test "$enable_llvm" = "no"; then
29563
+
29564
+
29565
+   $as_echo_n "              llvm        : "
29566
+   if test "x$enable_llvm" = "xno"; then :
29567
+  $as_echo "$have_jit (disabled)"
29568
+elif test "x$enable_llvm" = "xyes"; then :
29569
+  $as_echo "$have_jit"
29570
+elif test "x$enable_llvm" = "x"; then :
29571
+  $as_echo "$have_jit"
29572
+else
29573
+  $as_echo "$have_jit ($enable_llvm)"
29574
+fi
29575
+
29576
+elif test "x$llvm_linking" = "x"; then
29563 29577
 
29564 29578
 
29565 29579
    $as_echo_n "              llvm        : "
29566 29580
    if test "x$enable_llvm" = "xno"; then :
29567
-  $as_echo "$have_jit, from $system_llvm (disabled)"
29581
+  $as_echo "$have_jit($llvmver), from $system_llvm (disabled)"
29568 29582
 elif test "x$enable_llvm" = "xyes"; then :
29569
-  $as_echo "$have_jit, from $system_llvm"
29583
+  $as_echo "$have_jit($llvmver), from $system_llvm"
29570 29584
 elif test "x$enable_llvm" = "x"; then :
29571
-  $as_echo "$have_jit, from $system_llvm"
29585
+  $as_echo "$have_jit($llvmver), from $system_llvm"
29572 29586
 else
29573
-  $as_echo "$have_jit, from $system_llvm ($enable_llvm)"
29587
+  $as_echo "$have_jit($llvmver), from $system_llvm ($enable_llvm)"
29574 29588
 fi
29575 29589
 
29576 29590
 else
... ...
@@ -29578,13 +29694,13 @@ else
29578 29578
 
29579 29579
    $as_echo_n "              llvm        : "
29580 29580
    if test "x$enable_llvm" = "xno"; then :
29581
-  $as_echo "$have_jit, from $system_llvm ($llvm_linking) (disabled)"
29581
+  $as_echo "$have_jit($llvmver), from $system_llvm ($llvm_linking) (disabled)"
29582 29582
 elif test "x$enable_llvm" = "xyes"; then :
29583
-  $as_echo "$have_jit, from $system_llvm ($llvm_linking)"
29583
+  $as_echo "$have_jit($llvmver), from $system_llvm ($llvm_linking)"
29584 29584
 elif test "x$enable_llvm" = "x"; then :
29585
-  $as_echo "$have_jit, from $system_llvm ($llvm_linking)"
29585
+  $as_echo "$have_jit($llvmver), from $system_llvm ($llvm_linking)"
29586 29586
 else
29587
-  $as_echo "$have_jit, from $system_llvm ($llvm_linking) ($enable_llvm)"
29587
+  $as_echo "$have_jit($llvmver), from $system_llvm ($llvm_linking) ($enable_llvm)"
29588 29588
 fi
29589 29589
 
29590 29590
 fi
... ...
@@ -162,6 +162,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
162 162
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
163 163
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
165
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
165 166
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
166 167
 	$(top_srcdir)/m4/reorganization/yara.m4 \
167 168
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -378,6 +379,7 @@ infodir = @infodir@
378 378
 install_sh = @install_sh@
379 379
 libdir = @libdir@
380 380
 libexecdir = @libexecdir@
381
+llvmconfig = @llvmconfig@
381 382
 localedir = @localedir@
382 383
 localstatedir = @localstatedir@
383 384
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -162,6 +162,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
162 162
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
163 163
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
165
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
165 166
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
166 167
 	$(top_srcdir)/m4/reorganization/yara.m4 \
167 168
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -412,6 +413,7 @@ infodir = @infodir@
412 412
 install_sh = @install_sh@
413 413
 libdir = @libdir@
414 414
 libexecdir = @libexecdir@
415
+llvmconfig = @llvmconfig@
415 416
 localedir = @localedir@
416 417
 localstatedir = @localstatedir@
417 418
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -163,6 +163,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
163 163
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
166
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
166 167
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
167 168
 	$(top_srcdir)/m4/reorganization/yara.m4 \
168 169
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -408,6 +409,7 @@ infodir = @infodir@
408 408
 install_sh = @install_sh@
409 409
 libdir = @libdir@
410 410
 libexecdir = @libexecdir@
411
+llvmconfig = @llvmconfig@
411 412
 localedir = @localedir@
412 413
 localstatedir = @localstatedir@
413 414
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -167,6 +167,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
167 167
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
168 168
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
169 169
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
170
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
170 171
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
171 172
 	$(top_srcdir)/m4/reorganization/yara.m4 \
172 173
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -465,6 +466,7 @@ infodir = @infodir@
465 465
 install_sh = @install_sh@
466 466
 libdir = @libdir@
467 467
 libexecdir = @libexecdir@
468
+llvmconfig = @llvmconfig@
468 469
 localedir = @localedir@
469 470
 localstatedir = @localstatedir@
470 471
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -191,6 +191,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
191 191
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
192 192
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
193 193
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
194
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
194 195
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
195 196
 	$(top_srcdir)/m4/reorganization/yara.m4 \
196 197
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -889,6 +890,7 @@ infodir = @infodir@
889 889
 install_sh = @install_sh@
890 890
 libdir = @libdir@
891 891
 libexecdir = @libexecdir@
892
+llvmconfig = @llvmconfig@
892 893
 localedir = @localedir@
893 894
 localstatedir = @localstatedir@
894 895
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -123,7 +123,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/check_gnu_make.m4 \
123 123
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
124 124
 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
125 125
 	$(top_srcdir)/../../m4/reorganization/libs/openssl.m4 \
126
-	$(top_srcdir)/m4/llvm-flags.m4 $(top_srcdir)/configure.ac
126
+	$(top_srcdir)/m4/llvm-opts.m4 $(top_srcdir)/configure.ac
127 127
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
128 128
 	$(ACLOCAL_M4)
129 129
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
... ...
@@ -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 \
... ...
@@ -648,11 +648,11 @@ THREAD_LIBS
648 648
 DEBUG_BUILD_FALSE
649 649
 DEBUG_BUILD_TRUE
650 650
 LLVM_VERSION
651
-subdirs
652 651
 LLVMCONFIG_LIBFILES
653 652
 LLVMCONFIG_LIBS
654 653
 LLVMCONFIG_LDFLAGS
655 654
 LLVMCONFIG_CXXFLAGS
655
+subdirs
656 656
 llvmconfig
657 657
 GMAKE
658 658
 ifGNUmake
... ...
@@ -1472,9 +1472,9 @@ Optional Packages:
1472 1472
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1473 1473
   --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1474 1474
                           compiler's sysroot if not specified).
1475
-  --with-system-llvm      Use system llvm instead of built-in, uses full path
1476
-                          to llvm-config or bin directory (default=search PATH
1477
-                          environment variable)
1475
+  --with-system-llvm      Specify system llvm location or to use old package,
1476
+                          uses full path to llvm-config or bin directory
1477
+                          (default=search PATH environment variable)
1478 1478
   --with-llvm-linking     specifies method to linking llvm [static|dynamic],
1479 1479
                           only valid with --with-system-llvm
1480 1480
 
... ...
@@ -16412,10 +16412,18 @@ else
16412 16412
 fi
16413 16413
 
16414 16414
 
16415
+if test "$enable_llvm" != "no"; then
16416
+
16415 16417
 
16416 16418
 # Check whether --with-system-llvm was given.
16417 16419
 if test "${with_system_llvm+set}" = set; then :
16418
-  withval=$with_system_llvm; case "$withval" in
16420
+  withval=$with_system_llvm; system_llvm=$withval; if test "$enable_llvm" = "auto"; then enable_llvm="yes"; fi
16421
+else
16422
+  system_llvm="yes"
16423
+fi
16424
+
16425
+
16426
+case "$system_llvm" in
16419 16427
   yes)
16420 16428
      # Extract the first word of "llvm-config", so it can be a program name with args.
16421 16429
 set dummy llvm-config; ac_word=$2
... ...
@@ -16458,7 +16466,7 @@ fi
16458 16458
 
16459 16459
 
16460 16460
      if test "x$llvmconfig" = "x"; then
16461
-         as_fn_error $? "llvm-config cannot be found within PATH" "$LINENO" 5
16461
+         llvmoptserrmsg="llvm-config cannot be found within PATH"
16462 16462
      fi
16463 16463
      ;;
16464 16464
   no) ;;
... ...
@@ -16512,13 +16520,12 @@ fi
16512 16512
      fi
16513 16513
 
16514 16514
      if test "x$llvmconfig" = "x"; then
16515
-         as_fn_error $? "llvm-config does not exist at $withval" "$LINENO" 5
16515
+         llvmoptserrmsg="llvm-config does not exist at $withval"
16516 16516
      fi
16517 16517
      ;;
16518
-  esac
16519
-
16520
-fi
16518
+esac
16521 16519
 
16520
+if test "x$llvmconfig" != "x"; then
16522 16521
 
16523 16522
 
16524 16523
 # Check whether --with-llvm-linking was given.
... ...
@@ -16543,13 +16550,27 @@ else
16543 16543
 fi
16544 16544
 
16545 16545
 
16546
+llvmver=`$llvmconfig --version`
16547
+
16548
+else
16549
+llvmver="2.8"
16550
+system_llvm="internal"
16551
+
16552
+fi
16553
+fi
16554
+if test "x$llvmflagerrmsg" != "x"; then
16555
+    as_fn_error $? "$llvmflagerrmsg" "$LINENO" 5
16556
+fi
16557
+
16546 16558
 if test "x$llvmconfig" != "x"; then
16547
-    llvmver=`$llvmconfig --version`
16548 16559
     { $as_echo "$as_me:${as_lineno-$LINENO}: Using external LLVM" >&5
16549 16560
 $as_echo "$as_me: Using external LLVM" >&6;}
16550 16561
 else
16551
-    llvmver="2.8"
16552 16562
     packaged_llvm="yes"
16563
+
16564
+
16565
+subdirs="$subdirs llvm"
16566
+
16553 16567
 fi
16554 16568
 
16555 16569
 llvmver_val=`echo "$llvmver" | sed -e 's/svn//g'`
... ...
@@ -16631,15 +16652,6 @@ $as_echo "$as_me: LDFLAGS from llvm-config: $LLVMCONFIG_LDFLAGS" >&6;}
16631 16631
 $as_echo "$as_me: LIBS from llvm-config: $LLVMCONFIG_LIBS" >&6;}
16632 16632
 fi
16633 16633
 llvmver_int=${llvmver_major}${llvmver_minor}
16634
-
16635
-
16636
-if test "x$llvmconfig" = "x"; then
16637
-
16638
-
16639
-subdirs="$subdirs llvm"
16640
-
16641
-fi
16642
-
16643 16634
 LLVM_VERSION=$llvmver_int
16644 16635
 
16645 16636
 
... ...
@@ -163,6 +163,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
163 163
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
166
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
166 167
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
167 168
 	$(top_srcdir)/m4/reorganization/yara.m4 \
168 169
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -457,6 +458,7 @@ infodir = @infodir@
457 457
 install_sh = @install_sh@
458 458
 libdir = @libdir@
459 459
 libexecdir = @libexecdir@
460
+llvmconfig = @llvmconfig@
460 461
 localedir = @localedir@
461 462
 localstatedir = @localstatedir@
462 463
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -152,6 +152,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
152 152
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
153 153
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
154 154
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
155
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
155 156
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
156 157
 	$(top_srcdir)/m4/reorganization/yara.m4 \
157 158
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -509,6 +510,7 @@ infodir = @infodir@
509 509
 install_sh = @install_sh@
510 510
 libdir = @libdir@
511 511
 libexecdir = @libexecdir@
512
+llvmconfig = @llvmconfig@
512 513
 localedir = @localedir@
513 514
 localstatedir = @localstatedir@
514 515
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -164,6 +164,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
166 166
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
167
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
167 168
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
168 169
 	$(top_srcdir)/m4/reorganization/yara.m4 \
169 170
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -431,6 +432,7 @@ infodir = @infodir@
431 431
 install_sh = @install_sh@
432 432
 libdir = @libdir@
433 433
 libexecdir = @libexecdir@
434
+llvmconfig = @llvmconfig@
434 435
 localedir = @localedir@
435 436
 localstatedir = @localstatedir@
436 437
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -145,6 +145,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
145 145
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
146 146
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
147 147
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
148
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
148 149
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
149 150
 	$(top_srcdir)/m4/reorganization/yara.m4 \
150 151
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -361,6 +362,7 @@ infodir = @infodir@
361 361
 install_sh = @install_sh@
362 362
 libdir = @libdir@
363 363
 libexecdir = @libexecdir@
364
+llvmconfig = @llvmconfig@
364 365
 localedir = @localedir@
365 366
 localstatedir = @localstatedir@
366 367
 ltdl_LIBOBJS = @ltdl_LIBOBJS@
... ...
@@ -147,6 +147,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
147 147
 	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
148 148
 	$(top_srcdir)/m4/reorganization/distcheck.m4 \
149 149
 	$(top_srcdir)/m4/reorganization/llvm.m4 \
150
+	$(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \
150 151
 	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
151 152
 	$(top_srcdir)/m4/reorganization/yara.m4 \
152 153
 	$(top_srcdir)/m4/reorganization/libfreshclam.m4 \
... ...
@@ -651,6 +652,7 @@ infodir = @infodir@
651 651
 install_sh = @install_sh@
652 652
 libdir = @libdir@
653 653
 libexecdir = @libexecdir@
654
+llvmconfig = @llvmconfig@
654 655
 localedir = @localedir@
655 656
 localstatedir = @localstatedir@
656 657
 ltdl_LIBOBJS = @ltdl_LIBOBJS@