about summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-04-06T08·40+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-04-06T08·40+0000
commitbf3863b546dcb9bd62e86c0f17d8b12b2d08b874 (patch)
tree38ac17c5e8909abbead53e927f2cc3b49ee66d1c /configure.ac
parent03f1d1ecb5ef69c8c065c83373f9f9f749995c50 (diff)
* Fail if prerequisites are missing.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac25
1 files changed, 14 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index a2d05707e4..52625b92bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,19 +42,22 @@ AC_LANG_PUSH(C++)
 AC_CHECK_HEADERS([locale])
 AC_LANG_POP(C++)
 
-AC_PATH_PROG(curl, curl)
-AC_PATH_PROG(bzip2, bzip2)
-AC_PATH_PROG(bunzip2, bunzip2)
-AC_PATH_PROG(shell, sh)
-AC_PATH_PROG(xmllint, xmllint)
-AC_PATH_PROG(xsltproc, xsltproc)
+AC_DEFUN([NEED_PROG],
+[AC_PATH_PROG($1, $2)
+if test -z "$$1"; then
+    AC_MSG_ERROR([$1 is required])
+fi
+])
+
+NEED_PROG(curl, curl)
+NEED_PROG(bzip2, bzip2)
+NEED_PROG(bunzip2, bunzip2)
+NEED_PROG(shell, sh)
+AC_PATH_PROG(xmllint, xmllint, false)
+AC_PATH_PROG(xsltproc, xsltproc, false)
 AC_PATH_PROG(flex, flex, false)
 AC_PATH_PROG(bison, bison, false)
-AC_PATH_PROG(perl, perl)
-if test -z "$perl"; then
-  echo "Perl is required for Nix."
-  exit 1
-fi
+NEED_PROG(perl, perl)
 
 AC_ARG_WITH(docbook-catalog, AC_HELP_STRING([--with-docbook-catalog=PATH],
   [path of the DocBook XML DTD]),