diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 227 |
1 files changed, 162 insertions, 65 deletions
diff --git a/configure b/configure index ab148c2c..78e6ac69 100755 --- a/configure +++ b/configure @@ -624,10 +624,11 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS -RUNTEST METASMT_ROOT ENABLE_METASMT STP_ROOT +STP_NEEDS_BOOST +UPSTREAM_STP_LINK_FLAGS CXXCPP ac_ct_CXX CXXFLAGS @@ -648,8 +649,8 @@ RUNTIME_DEBUG_SYMBOLS RUNTIME_DISABLE_ASSERTIONS RUNTIME_ENABLE_OPTIMIZED ENABLE_POSIX_RUNTIME +KLEE_UCLIBC_BCA ENABLE_UCLIBC -KLEE_UCLIBC KLEE_BITCODE_CXX_COMPILER KLEE_BITCODE_C_COMPILER clang_cxx @@ -1372,6 +1373,7 @@ Optional Packages: (Default: auto-detect). If set, --with-llvmcc= must be set too. --with-uclibc Enable use of the klee uclibc at the given path + (klee-uclibc root directory or libc.a file --with-runtime Select build configuration for runtime libraries (default [Release+Asserts]) --with-stp Location of STP installation directory @@ -2660,8 +2662,8 @@ fi $as_echo_n "checking llvm build mode... " >&6; } if test X${with_llvm_build_mode} = Xcheck ; then - llvm_configs="`echo $llvm_obj/*/bin/llvm-config`" - if test -x "$llvm_configs" ; then + llvm_configs="`ls -1 $llvm_obj/*/bin/llvm-config 2>/dev/null | head -n 1`" + if test -x "$llvm_configs" ; then llvm_build_mode="`$llvm_configs --build-mode`" else as_fn_error $? "Could not autodetect build mode" "$LINENO" 5 @@ -2988,43 +2990,48 @@ if test "${with_uclibc+set}" = set; then : fi -if (test X${with_uclibc} = X && test -d uclibc); then - with_uclibc=uclibc -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking uclibc" >&5 $as_echo_n "checking uclibc... " >&6; } if (test X${with_uclibc} != X); then - if test ! -d ${with_uclibc}; then - as_fn_error $? "invalid uclibc directory: ${with_uclibc}" "$LINENO" 5 - fi + if test -d ${with_uclibc}; then - with_uclibc=`cd $with_uclibc 2> /dev/null; pwd` + with_uclibc=`cd $with_uclibc 2> /dev/null; pwd` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_uclibc" >&5 -$as_echo "$with_uclibc" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + KLEE_UCLIBC_BCA="${with_uclibc}/lib/libc.a" + if test ! -e "${KLEE_UCLIBC_BCA}"; then + as_fn_error $? "Could not find file ${KLEE_UCLIBC_BCA}" "$LINENO" 5 + fi + elif test -f ${with_uclibc}; then + + _kud=`dirname ${with_uclibc}` + _kud=`cd ${_kud}; pwd 2> /dev/null` + _kuf=`basename ${with_uclibc}` + + KLEE_UCLIBC_BCA="${_kud}/${_kuf}" + else + as_fn_error $? "Could not detect klee-uclibc" "$LINENO" 5 + fi -cat >>confdefs.h <<_ACEOF -#define KLEE_UCLIBC "$with_uclibc" -_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KLEE_UCLIBC_BCA" >&5 +$as_echo "$KLEE_UCLIBC_BCA" >&6; } + ENABLE_UCLIBC=1 -if test X${with_uclibc} != X ; then - ENABLE_UCLIBC=1 + +$as_echo "#define SUPPORT_KLEE_UCLIBC 1" >>confdefs.h else - ENABLE_UCLIBC=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ENABLE_UCLIBC=0 fi + # Check whether --enable-posix-runtime was given. if test "${enable_posix_runtime+set}" = set; then : enableval=$enable_posix_runtime; @@ -4827,6 +4834,68 @@ fi done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing mallinfo" >&5 +$as_echo_n "checking for library containing mallinfo... " >&6; } +if ${ac_cv_search_mallinfo+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char mallinfo (); +int +main () +{ +return mallinfo (); + ; + return 0; +} +_ACEOF +for ac_lib in '' malloc; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_cxx_try_link "$LINENO"; then : + ac_cv_search_mallinfo=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_mallinfo+:} false; then : + break +fi +done +if ${ac_cv_search_mallinfo+:} false; then : + +else + ac_cv_search_mallinfo=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_mallinfo" >&5 +$as_echo "$ac_cv_search_mallinfo" >&6; } +ac_res=$ac_cv_search_mallinfo +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +$as_echo "#define HAVE_MALLINFO 1" >>confdefs.h + +else + as_fn_error $? "mallinfo() must be supported by your malloc implementation" "$LINENO" 5 + +fi + + # Check whether --with-stp was given. @@ -4863,6 +4932,9 @@ fi CPPFLAGS="$old_CPPFLAGS" + STP_NEEDS_BOOST=0 + + # Try old STP { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vc_setInterfaceFlags in -lstp" >&5 $as_echo_n "checking for vc_setInterfaceFlags in -lstp... " >&6; } if ${ac_cv_lib_stp_vc_setInterfaceFlags+:} false; then : @@ -4908,11 +4980,76 @@ _ACEOF else - as_fn_error $? "Unable to link with libstp" "$LINENO" 5 + STP_NEEDS_BOOST=1 ; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Could not link with libstp. Checking if newer STP is being used" >&5 +$as_echo "Could not link with libstp. Checking if newer STP is being used" >&6; } + +fi + + + UPSTREAM_STP_LINK_FLAGS="-lboost_system -lboost_program_options" + if test "X$STP_NEEDS_BOOST" != X0 ; then + # Need to clear cached result + unset ac_cv_lib_stp_vc_setInterfaceFlags + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vc_setInterfaceFlags in -lstp" >&5 +$as_echo_n "checking for vc_setInterfaceFlags in -lstp... " >&6; } +if ${ac_cv_lib_stp_vc_setInterfaceFlags+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lstp -L$stp_root/lib $UPSTREAM_STP_LINK_FLAGS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char vc_setInterfaceFlags (); +int +main () +{ +return vc_setInterfaceFlags (); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + ac_cv_lib_stp_vc_setInterfaceFlags=yes +else + ac_cv_lib_stp_vc_setInterfaceFlags=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stp_vc_setInterfaceFlags" >&5 +$as_echo "$ac_cv_lib_stp_vc_setInterfaceFlags" >&6; } +if test "x$ac_cv_lib_stp_vc_setInterfaceFlags" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSTP 1 +_ACEOF + + LIBS="-lstp $LIBS" + +else + + as_fn_error $? "Unable to link with libstp. Check config.log to see what went wrong" "$LINENO" 5 fi + UPSTREAM_STP_LINK_FLAGS=$UPSTREAM_STP_LINK_FLAGS + + STP_NEEDS_BOOST=$STP_NEEDS_BOOST + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using old STP" >&5 +$as_echo "Using old STP" >&6; } + fi + STP_ROOT=$stp_root fi @@ -4985,46 +5122,6 @@ $as_echo "#define SUPPORT_METASMT 1" >>confdefs.h fi -# Extract the first word of "runtest", so it can be a program name with args. -set dummy runtest; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_RUNTEST+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $RUNTEST in - [\\/]* | ?:[\\/]*) - ac_cv_path_RUNTEST="$RUNTEST" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_RUNTEST="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -RUNTEST=$ac_cv_path_RUNTEST -if test -n "$RUNTEST"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUNTEST" >&5 -$as_echo "$RUNTEST" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - ac_config_commands="$ac_config_commands Makefile" |