diff options
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/configure.ac | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac index af5affc0..7d4ff994 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -523,10 +523,30 @@ else ]) CPPFLAGS="$old_CPPFLAGS" + STP_NEEDS_BOOST=0 + + # Try old STP AC_CHECK_LIB(stp, vc_setInterfaceFlags,, [ - AC_MSG_ERROR([Unable to link with libstp]) + STP_NEEDS_BOOST=1 ; AC_MSG_RESULT([Could not link with libstp. Checking if newer STP is being used]) ], -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 + + 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_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 |