This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
74 lines (54 loc) · 1.96 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
m4_define([plugin_file],Makefile.in)
m4_define([FRAMAC_SHARE_ENV],
[m4_normalize(m4_esyscmd([echo $FRAMAC_SHARE]))])
m4_define([FRAMAC_SHARE],
[m4_ifval(FRAMAC_SHARE_ENV,[FRAMAC_SHARE_ENV],
[m4_esyscmd(frama-c -print-path)])])
m4_ifndef([FRAMAC_M4_MACROS], [m4_include(FRAMAC_SHARE/configure.ac)])
check_plugin(mutation,PLUGIN_RELATIVE_PATH(plugin_file),
[support for Mutation plug-in],yes,yes)
# Check Frama-C version
#######################
AC_MSG_CHECKING(for Frama-C version)
AC_MSG_RESULT($FRAMAC_VERSION)
VERSION_NUMBER=`echo $FRAMAC_VERSION | sed -n -e 's/[[a-zA-Z]]\+-\([[0-9]]\+\)-.*/\1/p'`
EXTRA_VERSION_NUMBER=`echo $FRAMAC_VERSION | sed -n -e 's/[[a-zA-Z]]\+-[[0-9]]\+-\(.*\)/\1/p'`
REQUIRED_NUMBER=20180502
REQUIRED_NAME=Chlorine
case $FRAMAC_VERSION in
# $REQUIRED_NAME-$REQUIRED_NUMBER+dev*)
# # at the time being, must use the Frama-C development version
# ;;
$REQUIRED_NAME-$REQUIRED_NUMBER*)
if test -n "$EXTRA_VERSION_NUMBER"; then
AC_MSG_WARN(no guarantee of compatibility with your Frama-C custom \
version of $REQUIRED_NAME)
fi;;
*)
if test $VERSION_NUMBER -lt $REQUIRED_NUMBER; then
AC_MSG_ERROR(Frama-C version must be at least \
$REQUIRED_NAME-$REQUIRED_NUMBER.)
else
AC_MSG_WARN(Frama-C version is more recent than $REQUIRED_NAME: \
use it at your own risk)
fi;;
esac
# OCaml version
###############
OCAMLVERSION=`ocamlc -v | sed -n -e 's|.*version *\(.*\)$|\1|p' `
MAY_RUN_TESTS=yes
# C compiler and stdio.h
#########################
AC_CHECK_HEADERS([stdio.h],[HAVE_STDIO_H=yes],)
# not sure it can actually happens:
# look like the configure stops on error if no C compiler detected
if test -z $HAVE_STDIO_H; then
MAY_RUN_TESTS=no
AC_MSG_WARN([stdio.h missing: non-regression tests unavailable.])
fi
#######################
# Generating Makefile #
#######################
AC_SUBST(MAY_RUN_TESTS)
AC_SUBST(OCAMLVERSION)
write_plugin_config(Makefile)