diff options
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/configure.ac | 68 |
1 files changed, 25 insertions, 43 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 97bd5eb6..5b9c4e58 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -552,54 +552,36 @@ dnl ************************************************************************** AC_ARG_WITH(stp, AS_HELP_STRING([--with-stp], - [Location of STP installation directory]),, - [AC_MSG_ERROR([The --with-stp=<path> argument is mandatory where <path> is the path \ -to the root of your STP install])]) - -#Check for empty argument -if test "X$with_stp" = X ; then - AC_MSG_ERROR([<path> cannot be empty in --with-stp=<path>]) -else - stp_root=`(cd $with_stp && pwd) 2> /dev/null` - - #Check for bad path - if test "X$stp_root" = X ; then - AC_MSG_ERROR([Cannot access path $with_stp passed to --with-stp]) - fi - - old_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$stp_root/include" - AC_CHECK_HEADER(stp/c_interface.h,, [ - AC_MSG_ERROR([Unable to use stp/c_interface.h header]) - ]) - CPPFLAGS="$old_CPPFLAGS" + [Location of STP installation directory]),[ + #Check for empty argument + if test "X$withval" = X ; then + AC_MSG_ERROR([<path> cannot be empty in --with-stp=<path>]) + fi + stp_root=`(cd $withval && pwd) 2> /dev/null` - STP_NEEDS_BOOST=0 + #Check for bad path + if test "X$stp_root" = X ; then + AC_MSG_ERROR([Cannot access path $with_stp passed to --with-stp]) + fi - # Try old STP - AC_CHECK_LIB(stp, vc_setInterfaceFlags,, [ - STP_NEEDS_BOOST=1 ; AC_MSG_RESULT([Could not link with libstp. Checking if newer STP is being used]) - ], -L$stp_root/lib) + STP_CFLAGS="-I$stp_root/include" + STP_LDFLAGS="-L$stp_root/lib" + ]) - dnl Flags for upstream STP which has boost dependency - 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 +old_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $STP_CFLAGS" +AC_CHECK_HEADER(stp/c_interface.h,, + [ + AC_MSG_ERROR([Unable to use stp/c_interface.h header]) + ]) +CPPFLAGS="$old_CPPFLAGS" - AC_CHECK_LIB(stp, - vc_setInterfaceFlags,, [ - AC_MSG_ERROR([Unable to link with libstp. Check config.log to see what went wrong]) - ], -L$stp_root/lib $UPSTREAM_STP_LINK_FLAGS ) +AC_CHECK_LIB(stp, vc_setInterfaceFlags,, [ + AC_MSG_ERROR([Could not link with libstp]) +], "$STP_LDFLAGS") - AC_SUBST(UPSTREAM_STP_LINK_FLAGS, $UPSTREAM_STP_LINK_FLAGS) - AC_SUBST(STP_NEEDS_BOOST, $STP_NEEDS_BOOST) - else - AC_MSG_RESULT([Using old STP]) - fi - - AC_SUBST(STP_ROOT,$stp_root) -fi +AC_SUBST(STP_CFLAGS) +AC_SUBST(STP_LDFLAGS) dnl ************************************************************************** dnl User option to enable metaSMT constraint solvers and to specify the |