Project

General

Profile

« Previous | Next » 

Revision f6acf47b

Added by Pierre-Loïc Garoche about 9 years ago

Plugin based framework

View differences:

configure.ac
7 7

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

  
10
AC_PATH_PROG([OCAMLC],[ocamlc],[:])
11
AC_MSG_CHECKING(OCaml version)
12
ocamlc_version=`$OCAMLC -v | grep version | rev| cut -d \  -f 1 | rev`
13
major=`echo $ocamlc_version | cut -d . -f 1`
14
minor=`echo $ocamlc_version | cut -d . -f 2`
15
if (test "$major" -lt 3 -a "$minor" -lt 12 ); then
16
  AC_MSG_ERROR([Ocaml version must be at least 3.12. You have version $ocamlc_version])
17
fi
18
AC_MSG_RESULT(valid ocaml version detected: $ocamlc_version)
19

  
20
AC_PATH_PROG([OCAMLBUILD],[ocamlbuild],[:])
21

  
22

  
10 23
# default prefix is /usr/local
11 24
AC_PREFIX_DEFAULT(/usr/local)
12 25

  
26
# Checking libs
27

  
13 28
AC_ARG_WITH([ocamlgraph-path],
14 29
        [AS_HELP_STRING([--ocamlgraph-path],
15 30
              [specify the path of ocamlgraph library. graph.cmxa should be in ocamlgraph-path @<:@default=$(ocamlfind query ocamlgraph)@:>@])],
......
23 38
)
24 39
AC_SUBST(OCAMLGRAPH_PATH)
25 40

  
26

  
27
AC_PATH_PROG([OCAMLC],[ocamlc],[:])
28
AC_MSG_CHECKING(OCaml version)
29
ocamlc_version=`$OCAMLC -v | grep version | rev| cut -d \  -f 1 | rev`
30
major=`echo $ocamlc_version | cut -d . -f 1`
31
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])
34
fi
35
AC_MSG_RESULT(valid ocaml version detected: $ocamlc_version)
36

  
37
AC_PATH_PROG([OCAMLBUILD],[ocamlbuild],[:])
38

  
39

  
40
# Checking libs
41

  
42
# Checks for libraries. OCamlgraph
43 41
AC_MSG_CHECKING(ocamlgraph library)
44
   ocamlgraph_lib=`find $OCAMLGRAPH_PATH -iname graph.cmxa | grep -m 1 -o "graph.cmxa"`
42
   ocamlgraph_lib=`find $OCAMLGRAPH_PATH -iname graph.cmxa -nowarn | grep -m 1 -o "graph.cmxa"`
45 43
   if (test "x$ocamlgraph_lib" = xgraph.cmxa ); then
46
	ocamlgraph_lib_full=`find $OCAMLGRAPH_PATH -iname graph.cmxa  | grep -m 1 "graph.cmxa"`
47
      AC_MSG_RESULT(library detected: $ocamlgraph_lib_full )
48
   else
44
	ocamlgraph_lib_full=`find $OCAMLGRAPH_PATH -iname graph.cmxa -nowarn | grep -m 1 "graph.cmxa"`
45
      AC_MSG_RESULT($ocamlgraph_lib_full )
46
   else 
49 47
      AC_MSG_ERROR([ocamlgraph library not installed in $OCAMLGRAPH_PATH])
50 48
   fi
51 49

  
50
AC_CHECK_LIB(gmp, __gmpz_init, 
51
      [gmp=yes],
52
      [AC_MSG_RESULT([GNU MP not found])
53
      gmp=no])
54

  
55
AC_CHECK_LIB(mpfr, mpfr_add, [mpfr=yes], 
56
		   [AC_MSG_RESULT(
57
[MPFR not found])
58
mpfr=no])
59

  
52 60

  
53 61
# Workaround to solve an issue with ocamlbuild and C libraries.
54 62
# oCFLAGS="$CFLAGS"
......
86 94
# Instanciation
87 95
AC_CONFIG_FILES([Makefile
88 96
		 src/Makefile
89
 		 src/myocamlbuild.ml
97
                 src/myocamlbuild.ml
90 98
		 src/version.ml])
91 99

  
92 100
AC_OUTPUT
93 101

  
94 102

  
95 103
# summary
96
dnl AC_MSG_NOTICE(******** Configuration ********)
104
AC_MSG_NOTICE(******** Configuration ********)
105
AC_MSG_NOTICE(bin path:     $prefix/bin)
106
AC_MSG_NOTICE(include path: $prefix/include)
107
AC_MSG_NOTICE(********    Plugins    ********)
108

  
109
  if (test "x$gmp" = xyes -a "x$mpfr" = xyes ); then
110
       AC_MSG_NOTICE([-mpfr option enable])
111

  
112
   else 
113
       AC_MSG_WARN([MPFR option cannot be activated. Requires GMP and MPFR libs])
114
      
115
   fi
116
 
117
AC_MSG_NOTICE
118
AC_MSG_NOTICE(******** Configuration ********)
119
AC_MSG_NOTICE(******** Configuration ********)
120

  

Also available in: Unified diff