]> granicus.if.org Git - pdns/commitdiff
Actually test for ragel during dnsdist configure
authorPieter Lexis <pieter.lexis@powerdns.com>
Thu, 4 Feb 2016 15:58:48 +0000 (16:58 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Thu, 4 Feb 2016 16:06:40 +0000 (17:06 +0100)
pdns/dnsdistdist/Makefile.am
pdns/dnsdistdist/configure.ac
pdns/dnsdistdist/m4/dnsdist_check_ragel.m4 [new file with mode: 0644]

index 2b9f05671f08d1f7f7a32cec89967f1fb17850a1..f71fb7fbe909c6bfeb4ea0e01ba53873e031d776 100644 (file)
@@ -5,7 +5,7 @@ ACLOCAL_AMFLAGS = -I m4
 SUBDIRS=ext/yahttp
 
 dnslabeltext.cc: dnslabeltext.rl
-       ragel $< -o dnslabeltext.cc
+       $(AM_V_GEN)$(RAGEL) $< -o dnslabeltext.cc
 
 BUILT_SOURCES=htmlfiles.h
 
index c72fb993d543a023bbb13b24203121ec6f81eab8..805eab41b5c7000de1cb7c49b5eca7d70809b831 100644 (file)
@@ -6,6 +6,7 @@ AC_CONFIG_HEADERS([config.h])
 AC_PROG_CC
 AC_PROG_CXX
 PDNS_CHECK_LIBSODIUM
+DNSDIST_CHECK_RAGEL
 AC_PROG_LIBTOOL
 PDNS_CHECK_LIBEDIT([mandatory])
 PDNS_CHECK_CLOCK_GETTIME
diff --git a/pdns/dnsdistdist/m4/dnsdist_check_ragel.m4 b/pdns/dnsdistdist/m4/dnsdist_check_ragel.m4
new file mode 100644 (file)
index 0000000..999a89e
--- /dev/null
@@ -0,0 +1,8 @@
+AC_DEFUN([DNSDIST_CHECK_RAGEL], [
+  AC_CHECK_PROG([RAGEL], [ragel], [ragel])
+  if test "x$RAGEL" = "x"; then
+    if test ! -f "${srcdir}/dnslabeltext.cc"; then
+      AC_MSG_ERROR([ragel is missing and you don't have ${srcdir}/dnslabeltext.cc. Install ragel or download sources from www.dnsdist.org])
+    fi
+  fi
+])