The following commit has been merged in the master branch:
commit 78e3a07f7e68bb521d36e2491c82bf090f188a4d
Author: Guillem Jover <[email protected]>
Date:   Wed Oct 12 09:49:04 2011 +0200

    build: Check for needed programs when configuring for distribution
    
    When building a distribution tarball, the full gettext suite is required
    because the *.gmo files are shipped in there. A lex program is also
    required because the tarball ships the pre-generated *.c files.
    
    Reported-by: Cyril Brulebois <[email protected]>

diff --git a/configure.ac b/configure.ac
index 9b1adff..9ed5b1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,6 +17,8 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
 
 AM_GNU_GETTEXT_VERSION([0.18])
 AM_GNU_GETTEXT([external])
+DPKG_DIST_CHECK([test "$GMSGFMT" = ":" && test "$USE_NLS" = "yes"],
+                [gettext required when NLS support enabled])
 
 # Allow compilation without optional programs
 DPKG_WITH_PROG([dselect])
@@ -34,6 +36,7 @@ DPKG_WITH_DIR([logdir], [${localstatedir}/log],
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_LEX
+DPKG_DIST_CHECK([test "$LEX" = ":"], [lex program required])
 AC_PROG_RANLIB
 AC_CHECK_PROGS([DOXYGEN], [doxygen])
 AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
diff --git a/m4/dpkg-build.m4 b/m4/dpkg-build.m4
index 166854d..0efccfe 100644
--- a/m4/dpkg-build.m4
+++ b/m4/dpkg-build.m4
@@ -31,3 +31,12 @@ AC_DEFUN([DPKG_WITH_DIR], [
   )
   AC_SUBST([$1])
 ])# DPKG_WITH_DIR
+
+# DPKG_DIST_CHECK(COND, ERROR)
+# ---------------
+# Check if the condition is fulfilled when preparing a distribution tarball.
+AC_DEFUN([DPKG_DIST_CHECK], [
+  AS_IF([test ! -f $srcdir/.dist-version && $1], [
+    AC_ERROR([not building from distributed tarball, $2])
+  ])
+])# DPKG_DIST_CHECK

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to