Commits

Zachary Anderson committed 80efc95

Fixed autoconf script and Makefile

Comments (0)

Files changed (3)

 # Add additional modules here. Order matters. If module x depends on module y,
 # then x has to come after y in the list.
 MODULES = tututil ciltutoptions \
-          tut0 tut1 tut2 tut3 tut4 tut5 tut6 tut7 tut8 tut9 tut10 tut11 tut12 main
+          tut0 tut1 tut2 tut3 tut4 tut5 tut6 tut7 tut8 tut9 tut10 tut11 tut12 tut13 main
 
 OCAMLFIND = @OCAMLFIND@
 CILINC = $(shell $(OCAMLFIND) query cil)
 
-COMPILEFLAGS = -w x -I $(CILINC)
-LINKFLAGS    = -I $(CILINC)
+COMPILEFLAGS = -w x -I $(CILINC) -I +ocamlgraph
+LINKFLAGS    = -I $(CILINC) -I +ocamlgraph
 
 ifeq ($(BUILD_TUT11),true)
-  COMPILEFLAGS += -I +ocamlgraph -I +why3
-  LINKFLAGS += -I +ocamlgraph -I +why3
+  COMPILEFLAGS += -I +why3
+  LINKFLAGS += -I +why3
   PREPROC_ARG = -DBUILD_TUT11
 endif
 PREPROC = camlp4o pa_macro.cmo $(PREPROC_ARG)
 PROJECT_CMODULES =
 EXT_PROJ_CMODS =
 
-PROJECT_LIBS       = unix str nums
+PROJECT_LIBS       = unix str nums graph
 
 ifeq ($(BUILD_TUT11), true)
-  PROJECT_LIBS += dynlink graph why3
+  PROJECT_LIBS += dynlink why3
 endif
 PROJECT_LIBS += cil
 
 CILTUTHOME
 ARCHOS
 HAVE_WHY3
+OCAML_PKG_ocamlgraph
 OCAML_PKG_cil
 OCAMLFIND
 OCAMLBUILD
 fi
 
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package ocamlgraph" >&5
+$as_echo_n "checking for OCaml findlib package ocamlgraph... " >&6; }
+
+  unset found
+  unset pkg
+  found=no
+  for pkg in ocamlgraph  ; do
+    if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
+$as_echo "found" >&6; }
+      OCAML_PKG_ocamlgraph=$pkg
+      found=yes
+      break
+    fi
+  done
+  if test "$found" = "no" ; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+    OCAML_PKG_ocamlgraph=no
+  fi
+
+
+
+if test "$OCAML_PKG_ocamlgraph" = "no"; then
+  as_fn_error $? "Please install OCaml findlib module 'ocamlgraph'." "$LINENO" 5
+fi
+
 as_ac_File=`$as_echo "ac_cv_file_obj/$ARCHOS" | $as_tr_sh`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obj/$ARCHOS" >&5
 $as_echo_n "checking for obj/$ARCHOS... " >&6; }
   AC_MSG_ERROR([Please install OCaml findlib module 'cil'.])
 fi
 
+AC_CHECK_OCAML_PKG([ocamlgraph])
+if test "$OCAML_PKG_ocamlgraph" = "no"; then
+  AC_MSG_ERROR([Please install OCaml findlib module 'ocamlgraph'.])
+fi
 
 AC_CHECK_FILE(obj/$ARCHOS,, AC_MSG_RESULT(creating obj/$ARCHOS);
                             mkdir -p obj/$ARCHOS)