diff options
author | Arun Isaac | 2021-10-19 14:16:48 +0530 |
---|---|---|
committer | Arun Isaac | 2021-10-19 14:41:15 +0530 |
commit | 3641b3318dc72ee4f560263778ae6b0bf2a3a267 (patch) | |
tree | 76334e27379b9bfb784dc402c3995041ef0ed6ec | |
parent | 2ffe34da1a81b955c481783626d5022916f54e04 (diff) | |
download | ccwl-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.ac | 21 |
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]) |