Skip to content

Commit

Permalink
autojunk'd
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Lin committed Feb 6, 2015
1 parent 08db174 commit 0d3609c
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 14 deletions.
63 changes: 59 additions & 4 deletions configure
Expand Up @@ -922,6 +922,7 @@ with_libncurses_prefix
with_libpdcurses_prefix
enable_distcheck_werror
with_system_llvm
with_llvm_linking
enable_llvm
enable_sha_collector_for_internal_use
with_libcurl
Expand Down Expand Up @@ -1648,6 +1649,8 @@ Optional Packages:
--with-system-llvm use system llvm instead of built-in, uses full path
to llvm-config [default=/usr/local or /usr if not
found in /usr/local]
--with-llvm-linking specifies method to linking llvm [static|dynamic],
only valid with --with-system-llvm
--with-libcurl[=DIR] path to directory containing libcurl
[default=/usr/local or /usr if not found in
/usr/local]
Expand Down Expand Up @@ -22721,6 +22724,36 @@ else
fi



# Check whether --with-llvm-linking was given.
if test "${with_llvm_linking+set}" = set; then :
withval=$with_llvm_linking;
if test "x$system_llvm" = "xbuilt-in"; then
as_fn_error $? "Failed to configure LLVM, and LLVM linking was specified without specifying system-llvm" "$LINENO" 5
else
case "$withval" in
static)
llvm_linking="static"
;;
dynamic)
llvm_linking="dynamic"
;;
*)
as_fn_error $? "Invalid argument to --with-llvm-linking" "$LINENO" 5
esac
fi

else

if test "x$system_llvm" = "xbuilt-in"; then
llvm_linking=""
else
llvm_linking="auto"
fi

fi


# Check whether --enable-llvm was given.
if test "${enable_llvm+set}" = set; then :
enableval=$enable_llvm; enable_llvm=$enableval
Expand Down Expand Up @@ -22749,6 +22782,7 @@ subdirs="$subdirs libclamav/c++"

else
system_llvm="none"
llvm_linking=""
fi

# Check whether --enable-sha-collector-for-internal-use was given.
Expand Down Expand Up @@ -25579,6 +25613,11 @@ fi
if test "$enable_llvm" = "yes" && test "$subdirfailed" != "no"; then
as_fn_error $? "Failed to configure LLVM, and LLVM was explicitly requested" "$LINENO" 5
fi
if test "$enable_llvm" = "auto" && test "$subdirfailed" != "no"; then
system_llvm="MIA"
llvm_linking=""
fi

if test "$subdirfailed" != "yes" && test "$enable_llvm" != "no"; then
ENABLE_LLVM_TRUE=
ENABLE_LLVM_FALSE='#'
Expand Down Expand Up @@ -28227,8 +28266,8 @@ cat <<EOF
pthreads : $have_pthreads ($THREAD_LIBS)
EOF

{ $as_echo "$as_me:${as_lineno-$LINENO}: Summary of miscellaneous features" >&5
$as_echo "$as_me: Summary of miscellaneous features" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Summary of miscellaneous features" >&5
$as_echo "$as_me: Summary of miscellaneous features" >&6;}
if test "x$CHECK_LIBS" = "x"; then
check_libs="no"
else
Expand Down Expand Up @@ -28345,8 +28384,8 @@ else
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: Summary of engine performance features)" >&5
$as_echo "$as_me: Summary of engine performance features)" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Summary of engine performance features" >&5
$as_echo "$as_me: Summary of engine performance features" >&6;}
if test "x$enable_debug" = "xyes"; then


Expand Down Expand Up @@ -28380,6 +28419,7 @@ have_jit="no"
if test "$subdirfailed" = "no"; then
have_jit="yes"
fi
if test "x$llvm_linking" = "x"; then


$as_echo_n " llvm : "
Expand All @@ -28393,6 +28433,21 @@ else
$as_echo "$have_jit, from $system_llvm ($enable_llvm)"
fi

else


$as_echo_n " llvm : "
if test "x$enable_llvm" = "xno"; then :
$as_echo "$have_jit, from $system_llvm ($llvm_linking) (disabled)"
elif test "x$enable_llvm" = "xyes"; then :
$as_echo "$have_jit, from $system_llvm ($llvm_linking)"
elif test "x$enable_llvm" = "x"; then :
$as_echo "$have_jit, from $system_llvm ($llvm_linking)"
else
$as_echo "$have_jit, from $system_llvm ($llvm_linking) ($enable_llvm)"
fi

fi


$as_echo_n " mempool : "
Expand Down
54 changes: 44 additions & 10 deletions libclamav/c++/configure
Expand Up @@ -595,7 +595,6 @@ PACKAGE_STRING='libclamavc++ devel'
PACKAGE_BUGREPORT='http://bugs.clamav.net'
PACKAGE_URL=''

ac_unique_file="llvm/configure"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
Expand Down Expand Up @@ -796,6 +795,7 @@ with_gnu_ld
with_sysroot
enable_libtool_lock
with_system_llvm
with_llvm_linking
enable_llvm
enable_optimized
enable_all_jit_targets
Expand Down Expand Up @@ -1462,6 +1462,8 @@ Optional Packages:
--with-system-llvm Use system llvm instead of built-in, uses full path
to llvm-config (default= search /usr/local or /usr
if not found in /usr/local)
--with-llvm-linking specifies method to linking llvm [static|dynamic],
only valid with --with-system-llvm

Some influential environment variables:
CXX C++ compiler command
Expand Down Expand Up @@ -2361,7 +2363,6 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.




ac_config_headers="$ac_config_headers clamavcxx-config.h"

# Make sure we can run config.sub.
Expand Down Expand Up @@ -15628,6 +15629,29 @@ $as_echo "$as_me: Using external LLVM" >&6;}
fi


llvm_linking=

# Check whether --with-llvm-linking was given.
if test "${with_llvm_linking+set}" = set; then :
withval=$with_llvm_linking;
if test "x$llvmconfig" = "x"; then
as_fn_error $? "Failed to configure LLVM, and LLVM linking was specified without valid llvm-config" "$LINENO" 5
else
case "$withval" in
static)
llvm_linking="static"
;;
dynamic)
llvm_linking="dynamic"
;;
*)
as_fn_error $? "Invalid argument to --with-llvm-linking" "$LINENO" 5
esac
fi

fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported LLVM version" >&5
$as_echo_n "checking for supported LLVM version... " >&6; }
if test "x$llvmconfig" = "x"; then
Expand Down Expand Up @@ -15668,18 +15692,28 @@ fi
if test "x$llvmconfig" != "x"; then
LLVMCONFIG_CXXFLAGS=`$llvmconfig --cxxflags`

if test $llvmver_test -ge 350; then
ldflags=`$llvmconfig --ldflags`
syslibs=`$llvmconfig --system-libs`
LLVMCONFIG_LDFLAGS="$ldflags $syslibs"

else
if test "x$llvm_linking" = "xdynamic"; then
LLVMCONFIG_LDFLAGS=`$llvmconfig --ldflags`

fi
LLVMCONFIG_LIBS=`$llvmconfig --libs jit nativecodegen scalaropts ipo`
LLVMCONFIG_LIBS=-lLLVM-$llvmver


else
if test $llvmver_test -ge 350; then
ldflags=`$llvmconfig --ldflags`
syslibs=`$llvmconfig --system-libs`
LLVMCONFIG_LDFLAGS="$ldflags $syslibs"

LLVMCONFIG_LIBFILES=`$llvmconfig --libfiles jit nativecodegen scalaropts ipo`
else
LLVMCONFIG_LDFLAGS=`$llvmconfig --ldflags`

fi
LLVMCONFIG_LIBS=`$llvmconfig --libs jit nativecodegen scalaropts ipo`

LLVMCONFIG_LIBFILES=`$llvmconfig --libfiles jit nativecodegen scalaropts ipo`

fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: CXXFLAGS from llvm-config: $LLVMCONFIG_CXXFLAGS" >&5
$as_echo "$as_me: CXXFLAGS from llvm-config: $LLVMCONFIG_CXXFLAGS" >&6;}
Expand Down

0 comments on commit 0d3609c

Please sign in to comment.