Commit 6643d425 authored by Guillaume Melquiond's avatar Guillaume Melquiond

Improve detection of Frama-C and add Merlin support.

parent 8598369d
......@@ -2174,16 +2174,16 @@ headers:
# myself
#########
Makefile: Makefile.in config.status
./config.status chmod --file $@
src/jessie/Makefile: src/jessie/Makefile.in config.status
./config.status chmod --file $@
src/config.sh: src/config.sh.in config.status
./config.status chmod --file $@
.merlin: .merlin.in config.status
AUTOCONF_FILES = \
Makefile \
src/jessie/Makefile \
src/config.sh \
.merlin \
src/jessie/.merlin \
lib/why3/META \
doc/version.tex
$(AUTOCONF_FILES): %: %.in config.status
./config.status chmod --file $@
src/util/config.ml share/Makefile.config: src/config.sh
......@@ -2193,17 +2193,9 @@ src/util/config.ml share/Makefile.config: src/config.sh
clean::
rm -f share/Makefile.config
doc/version.tex: doc/version.tex.in config.status
./config.status chmod --file $@
config.status: configure
./config.status --recheck
all: lib/why3/META .merlin
lib/why3/META: lib/why3/META.in config.status
./config.status chmod --file $@
configure: configure.in Version
autoconf -f
......@@ -2214,9 +2206,8 @@ configure: configure.in Version
.PHONY: distclean
distclean: clean
rm -f config.status config.cache config.log .merlin \
Makefile src/util/config.ml doc/version.tex \
src/jessie/Makefile src/config.sh lib/why3/META
rm -f config.status config.cache config.log \
src/util/config.ml $(AUTOCONF_FILES)
depend:
rm -f $^
......
......@@ -793,6 +793,7 @@ if test "$enable_pvs_libs" = yes; then
fi
#check frama-c
FRAMAC_SUPPORTED=Sulfur
if test "$enable_frama_c" = yes ; then
AC_CHECK_PROG(FRAMAC,frama-c,frama-c,no)
if test "$FRAMAC" = no ; then
......@@ -801,20 +802,24 @@ if test "$enable_frama_c" = yes ; then
reason_frama_c=" (frama-c not found)"
else
AC_MSG_CHECKING(Frama-C version)
FRAMAC_VERSION=`$FRAMAC -version | sed -n -e 's|Version: *\(.*\)$|\1|p'`
FRAMAC_VERSION=`$FRAMAC -version | sed -n -e 's|\(Version: \)\?\(.*\)$|\2|p'`
AC_MSG_RESULT($FRAMAC_VERSION)
case $FRAMAC_VERSION in
Sodium-*) ;;
*) AC_MSG_WARN(Version Sodium required.)
$FRAMAC_SUPPORTED-*) ;;
*) AC_MSG_WARN(Version $FRAMAC_SUPPORTED required.)
enable_frama_c=no
reason_frama_c=" (version Sodium required)"
reason_frama_c=" (version $FRAMAC_SUPPORTED required)"
;;
esac
FRAMAC_SHARE=`$FRAMAC -print-path`
FRAMAC_LIBDIR=`$FRAMAC -print-libpath`
fi
fi
if test "$enable_frama_c" = yes; then
FRAMAC_SHARE=`$FRAMAC -print-path`
FRAMAC_LIBDIR=`$FRAMAC -print-libpath`
FRAMAC_INCLUDE="-I $FRAMAC_LIBDIR"
fi
#Viewer for ps and pdf
dnl AC_CHECK_PROGS(PSVIEWER,gv evince)
dnl AC_CHECK_PROGS(PDFVIEWER,xpdf acroread evince)
......@@ -910,6 +915,7 @@ AC_SUBST(FRAMAC)
AC_SUBST(FRAMAC_VERSION)
AC_SUBST(FRAMAC_SHARE)
AC_SUBST(FRAMAC_LIBDIR)
AC_SUBST(FRAMAC_INCLUDE)
AC_SUBST(enable_local)
AC_SUBST(LOCALDIR)
......@@ -920,15 +926,15 @@ dnl AC_SUBST(PSVIEWER)
dnl AC_SUBST(PDFVIEWER)
# Finally create the Makefile from Makefile.in
AC_CONFIG_FILES(Makefile src/config.sh doc/version.tex)
AC_CONFIG_FILES(Makefile src/jessie/Makefile)
AC_CONFIG_FILES(src/config.sh doc/version.tex)
AC_CONFIG_FILES(lib/why3/META)
AC_CONFIG_FILES(.merlin)
AC_CONFIG_FILES(src/jessie/Makefile)
AC_CONFIG_FILES(.merlin src/jessie/.merlin)
AC_CONFIG_COMMANDS([chmod],
chmod a-w Makefile src/config.sh doc/version.tex;
chmod a-w Makefile src/jessie/Makefile;
chmod a-w src/config.sh doc/version.tex;
chmod a-w lib/why3/META;
chmod a-w .merlin;
chmod a-w src/jessie/Makefile;
chmod a-w .merlin src/jessie/.merlin;
chmod u+x src/config.sh)
AC_OUTPUT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment