bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch to check for required programs when building from source checkout


From: Ed Avis
Subject: Patch to check for required programs when building from source checkout
Date: Sat, 4 Oct 2008 16:56:20 +0100 (BST)

A few tools are required to build coreutils from a git checkout, but not checked in a friendly way. This patch adds checks to bootstrap and configure.

Oh, and updates automake to 1.10.1, which appears to work.

diff --git a/bootstrap b/bootstrap
index 438a145..0232ae9 100755
--- a/bootstrap
+++ b/bootstrap
@@ -22,6 +22,16 @@
 nl='
 '

+# These programs are needed by this script.
+if ! autopoint --help >/dev/null; then echo You must install autopoint from 
gettext; exit 1; fi
+if ! aclocal --help >/dev/null; then echo You must install aclocal from 
automake; exit 1; fi
+
+# This isn't needed by this script, but it is necessary for building
+# from a source checkout, and is not checked by configure because
+# normal building from a distributed tarball doesn't require it.
+#
+if ! makeinfo --help >/dev/null; then echo You must install makeinfo from 
Texinfo; exit 1; fi
+
 # Ensure file names are sorted consistently across platforms.
 LC_ALL=C
 export LC_ALL
@@ -558,9 +568,11 @@ echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
 $gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
 slurp $bt || exit

-for file in $gnulib_files; do
-  symlink_to_dir "$GNULIB_SRCDIR" $file || exit
-done
+if test "x$gnulib_files" != x; then
+  for file in $gnulib_files; do
+    symlink_to_dir "$GNULIB_SRCDIR" $file || exit
+  done
+fi


 # Import from gettext.
diff --git a/configure.ac b/configure.ac
index 549c7ee..61b708c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,7 @@ AC_CONFIG_SRCDIR(src/ls.c)
 AC_CONFIG_AUX_DIR(build-aux)
 AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])

-AM_INIT_AUTOMAKE([1.10a dist-lzma])
+AM_INIT_AUTOMAKE([1.10.1 dist-lzma])

 AC_PROG_CC_STDC
 AM_PROG_CC_C_O
@@ -291,6 +291,12 @@ case $t in
                   1) ;;
 esac

+AC_CHECK_PROG([GPERF], [gperf], [1])
+if test "x$GPERF" = x; then
+  AC_MSG_ERROR([You need to install gperf])
+  exit 1
+fi
+
 # Given the name of a variable containing a space-separated list of
 # install-by-default programs and the actual list do-not-install-by-default
 # programs, modify the former variable to reflect any "do-install" and

--
Ed Avis <address@hidden>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]