Fix EXTRA_DIST in Makefiles.
[whenjobs.git] / configure.ac
index f192971..4bd2e41 100644 (file)
@@ -58,12 +58,56 @@ fi
 dnl Check support for 64 bit file offsets.
 AC_SYS_LARGEFILE
 
-dnl lex and yacc, or hopefully GNU equivalents.
-AC_PROG_LEX
-AC_PROG_YACC
+dnl OCaml compiler.
+AC_PROG_OCAML
+if test "$OCAMLC" = "no"; then
+    AC_MSG_ERROR([You must install the OCaml compiler])
+fi
+
+AM_CONDITIONAL([HAVE_OCAMLOPT], [test "x$OCAMLOPT" != "xno"])
+
+dnl Camlp4 is required.
+AC_PROG_CAMLP4
+if test "x$CAMLP4" = "xno"; then
+    AC_MSG_ERROR([You must install camlp4 (the OCaml macro preprocessor)])
+fi
+
+dnl OCaml findlib ("ocamlfind") is required.
+AC_PROG_FINDLIB
+if test "x$OCAMLFIND" = "xno"; then
+    AC_MSG_ERROR([You must install OCaml findlib (the ocamlfind command)])
+fi
+
+dnl OCaml calendar library is required.
+AC_CHECK_OCAML_PKG(calendar)
+if test "x$OCAML_PKG_calendar" = "xno"; then
+    AC_MSG_ERROR([You must install OCaml calendar library version 2])
+fi
+
+dnl OCaml ocamlnet RPC library + dependencies (version 3) is required.
+AC_CHECK_OCAML_PKG(rpc)
+if test "x$OCAML_PKG_rpc" = "x"; then
+    AC_MSG_ERROR([You must install OCaml ocamlnet library version 3])
+fi
+
+AC_CHECK_PROG(OCAMLRPCGEN,ocamlrpcgen,ocamlrpcgen)
+if test "x$OCAMLRPCGEN" = "x"; then
+    AC_MSG_ERROR([You must install the ocamlrpcgen program])
+fi
+
+dnl Check for POD (for manual pages).
+AC_CHECK_PROG(PERLDOC,perldoc,perldoc)
+if test "x$PERLDOC" = "xno"; then
+    AC_MSG_ERROR([You must install the perldoc program])
+fi
 
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([Makefile
                  daemon/Makefile
-                 tools/Makefile])
+                 lib/config.ml
+                 lib/Makefile
+                 tests/jobs/Makefile
+                 tests/parsing/Makefile
+                 tools/Makefile
+                 whenjobs.spec])
 AC_OUTPUT