aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2021-10-19 14:16:48 +0530
committerArun Isaac2021-10-19 14:41:15 +0530
commit3641b3318dc72ee4f560263778ae6b0bf2a3a267 (patch)
tree76334e27379b9bfb784dc402c3995041ef0ed6ec
parent2ffe34da1a81b955c481783626d5022916f54e04 (diff)
downloadccwl-3641b3318dc72ee4f560263778ae6b0bf2a3a267.tar.gz
ccwl-3641b3318dc72ee4f560263778ae6b0bf2a3a267.tar.lz
ccwl-3641b3318dc72ee4f560263778ae6b0bf2a3a267.zip
configure: Error out if required programs are not found.
* configure.ac (CHECK_FOR_PROGRAM, REQUIRED_PROGRAM): New macros. Use REQUIRED_PROGRAM to check for dot, cwltool and skribilo.
-rw-r--r--configure.ac21
1 files changed, 18 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 024b4a6..8f7d7ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,11 +23,26 @@ AM_SILENT_RULES([yes])
GUILE_PKG([3.0 2.2])
GUILE_PROGS
+
+# CHECK_FOR_PROGRAM(VARIABLE, PROGRAM-TO-CHECK-FOR, MESSAGE)
+# ----------------------------------------------------------
+AC_DEFUN([CHECK_FOR_PROGRAM], [
+ AC_PATH_PROG([$1], [$2], [no])
+ AS_IF([test x"$$1" = xno], [$3])
+])
+
+# REQUIRED_PROGRAM(VARIABLE, PROGRAM-TO-CHECK-FOR, PACKAGE-CONTAINING-PROGRAM)
+# ----------------------------------------------------------------------------
+AC_DEFUN([REQUIRED_PROGRAM], [
+ CHECK_FOR_PROGRAM([$1], [$2], [AC_MSG_ERROR([cannot find $2 m4_ifnblank([$3], [from the $3 package])])])
+])
+])
+
AC_PROG_SED
-AC_PATH_PROG([DOT], [dot])
-AC_PATH_PROG([CWLTOOL], [cwltool])
+REQUIRED_PROGRAM([DOT], [dot], [graphviz])
+REQUIRED_PROGRAM([CWLTOOL], [cwltool])
+REQUIRED_PROGRAM([SKRIBILO], [skribilo])
AC_PATH_PROG([EMACS], [emacs])
-AC_PATH_PROG([SKRIBILO], [skribilo])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])