Project

General

Profile

Revision 3b2bd83d configure.ac

View differences:

configure.ac
1
define([svnversion], esyscmd([sh -c "svnversion|sed "s/:.*//"|tr -d '\n'"]))dnl
2
AC_INIT([lustrec], [1.1-svnversion], [ploc@garoche.net])
1
define([gitversion], esyscmd([sh -c "git log --oneline | wc -l | tr -d '\n'"]))
3 2

  
3
AC_INIT([lustrec], [1.3-gitversion], [ploc@garoche.net])
4
AC_SUBST(VERSION_CODENAME, "Xia/Zhong-Kang-dev")
5
# Next release will be
6
#AC_INIT([lustrec], [1.3], [ploc@garoche.net])
7
#AC_SUBST(VERSION_CODENAME, "Xia/Zhong-Kang")
4 8

  
5
AC_DEFINE(SVN_REVISION, "svnversion", [SVN Revision])
6
AC_SUBST(SVN_REVISION)
9
#AC_DEFINE(SVN_REVISION, "svnversion", [SVN Revision])
10
#AC_SUBST(SVN_REVISION)
7 11

  
8 12
AC_CONFIG_SRCDIR([src/main_lustre_compiler.ml])
9 13

  
......
23 27
)
24 28
AC_SUBST(OCAMLGRAPH_PATH)
25 29

  
30
AC_SUBST(SRC_PATH, esyscmd([sh -c "pwd" | tr -d '\n']))
26 31

  
27 32
AC_PATH_PROG([OCAMLC],[ocamlc],[:])
28 33
AC_MSG_CHECKING(OCaml version)
29 34
ocamlc_version=`$OCAMLC -v | grep version | rev| cut -d \  -f 1 | rev`
30 35
major=`echo $ocamlc_version | cut -d . -f 1`
31 36
minor=`echo $ocamlc_version | cut -d . -f 2`
32
if (test "$major" -lt 3 -a "$minor" -lt 11 ); then
33
  AC_MSG_ERROR([Ocaml version must be at least 3.11. You have version $ocamlc_version])
37
if (test "$major" -lt 4 -a "$minor" -lt 0 ); then
38
  AC_MSG_ERROR([Ocaml version must be at least 4.0. You have version $ocamlc_version])
34 39
fi
35 40
AC_MSG_RESULT(valid ocaml version detected: $ocamlc_version)
36 41

  
......
43 48
AC_MSG_CHECKING(ocamlgraph library)
44 49
   ocamlgraph_lib=`find $OCAMLGRAPH_PATH -iname graph.cmxa | grep -m 1 -o "graph.cmxa"`
45 50
   if (test "x$ocamlgraph_lib" = xgraph.cmxa ); then
46
	ocamlgraph_lib_full=`find $OCAMLGRAPH_PATH -iname graph.cmxa  | grep -m 1 "graph.cmxa"`
51
	ocamlgraph_lib_full=`find $OCAMLGRAPH_PATH -iname graph.cmxa | grep -m 1 "graph.cmxa"`
47 52
      AC_MSG_RESULT(library detected: $ocamlgraph_lib_full )
48 53
   else
49 54
      AC_MSG_ERROR([ocamlgraph library not installed in $OCAMLGRAPH_PATH])
50 55
   fi
51 56

  
57
AC_CHECK_LIB(gmp, __gmpz_init, 
58
      [gmp=yes],
59
      [AC_MSG_RESULT([GNU MP not found])
60
      gmp=no])
61

  
62
AC_CHECK_LIB(mpfr, mpfr_add, [mpfr=yes], 
63
		   [AC_MSG_RESULT(
64
[MPFR not found])
65
mpfr=no])
66

  
52 67

  
53 68
# Workaround to solve an issue with ocamlbuild and C libraries.
54 69
# oCFLAGS="$CFLAGS"
......
87 102
AC_CONFIG_FILES([Makefile
88 103
		 src/Makefile
89 104
                 src/myocamlbuild.ml
90
		 src/version.ml])
105
		 src/version.ml
106
		 test/test-compile.sh
107
		 ])
91 108

  
92 109
AC_OUTPUT
93 110

  
94 111

  
95 112
# summary
96
dnl AC_MSG_NOTICE(******** Configuration ********)
113
AC_MSG_NOTICE(******** Configuration ********)
114
AC_MSG_NOTICE(bin path:     $prefix/bin)
115
AC_MSG_NOTICE(include path: $prefix/include)
116
AC_MSG_NOTICE(********    Plugins    ********)
117

  
118
  if (test "x$gmp" = xyes -a "x$mpfr" = xyes ); then
119
       AC_MSG_NOTICE([-mpfr option enable])
120

  
121
   else 
122
       AC_MSG_WARN([MPFR option cannot be activated. Requires GMP and MPFR libs])
123
      
124
   fi
125
 
126
AC_MSG_NOTICE
127
AC_MSG_NOTICE(******** Configuration ********)
128

  

Also available in: Unified diff