Skip to content

Commit

Permalink
fix mcrl2 m4 to work with newest SVN version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Meijuh committed Feb 11, 2015
1 parent 09e01f3 commit ba6db31
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions m4/acx_mcrl2.m4
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,19 @@ if test x"$acx_mcrl2" = xyes; then
8) MCRL2_PINS_CPPFLAGS="-DAT_64BIT" ;;
*) AC_MSG_FAILURE([can only compile mCRL2 on 32- and 64-bit machines.]) ;;
esac
mcrl2_lib_dir=""
if test -d ${with_mcrl2}/lib/mcrl2; then
mcrl2_lib_dir="${with_mcrl2}/lib/mcrl2"
else
mcrl2_lib_dir="${with_mcrl2}/lib"
fi
#AX_CHECK_COMPILE_FLAG([-std=c++0x], [CXXFLAGS="$CXXFLAGS -std=c++0x"])
AC_SUBST(MCRL2_PINS_CPPFLAGS, ["$MCRL2_PINS_CPPFLAGS -I$with_mcrl2/include -I$with_mcrl2/include/dparser"])
AC_SUBST(MCRL2_PINS_LDFLAGS, ["-L${with_mcrl2}/lib/mcrl2"])
AC_SUBST(MCRL2_PINS_CPPFLAGS, ["$MCRL2_PINS_CPPFLAGS -I$with_mcrl2/include"])
AC_SUBST(MCRL2_PINS_LDFLAGS, ["-L${mcrl2_lib_dir}"])
AC_SUBST(MCRL2_LIBS, [""])
AC_SUBST(MCRL2_LDFLAGS, ["$acx_cv_cc_export_dynamic -Wl,-rpath,${with_mcrl2}/lib/mcrl2"])
AC_SUBST(MCRL2_LDFLAGS, ["$acx_cv_cc_export_dynamic -Wl,-rpath,${mcrl2_lib_dir}"])
AC_SUBST(MCRL2, ["${with_mcrl2}/bin/mcrl22lps"])
AC_SUBST(PBES, ["${with_mcrl2}/bin/lps2pbes"])
Expand Down Expand Up @@ -93,29 +101,20 @@ if test x"$acx_mcrl2" = xyes; then
AX_LET([LIBS], ["$LIBS"],
[LDFLAGS], ["$MCRL2_PINS_LDFLAGS $LDFLAGS"],
[acx_mcrl2_libs=yes
AC_CHECK_LIB([dparser], [main],
[MCRL2_PINS_LIBS="-ldparser $MCRL2_PINS_LIBS"
LIBS="-ldparser $LIBS"])
])
AC_LANG_POP([C])
AC_LANG_PUSH([C++])
AX_LET([LIBS], ["$MCRL2_PINS_LIBS $LIBS"],
[LDFLAGS], ["$MCRL2_PINS_LDFLAGS $LDFLAGS"],
[CXXFLAGS], ["$MCRL2_PINS_CXXFLAGS $CXXFLAGS"],
[AX_CXX_CHECK_LIB([dparser], [main],
[MCRL2_PINS_LIBS="-ldparser $MCRL2_PINS_LIBS"
LIBS="-ldparser $LIBS"])
AX_CXX_CHECK_LIB([mcrl2_syntax], [main],
[AX_CXX_CHECK_LIB([mcrl2_syntax], [main],
[MCRL2_PINS_LIBS="-lmcrl2_syntax $MCRL2_PINS_LIBS"
LIBS="-lmcrl2_syntax $LIBS"])
AX_CXX_CHECK_LIB([mcrl2_utilities], [main],
[MCRL2_PINS_LIBS="-lmcrl2_utilities $MCRL2_PINS_LIBS"
LIBS="-lmcrl2_utilities $LIBS"],
[acx_mcrl2_libs=no])
AX_CXX_CHECK_LIB([mcrl2_aterm], [main],
[MCRL2_PINS_LIBS="-lmcrl2_aterm $MCRL2_PINS_LIBS"
LIBS="-lmcrl2_aterm $LIBS"])
AX_CXX_CHECK_LIB([mcrl2_atermpp], [main],
[MCRL2_PINS_LIBS="-lmcrl2_atermpp $MCRL2_PINS_LIBS"
LIBS="-lmcrl2_atermpp $LIBS"])
Expand Down

0 comments on commit ba6db31

Please sign in to comment.