path: root/reproduce/software/shell/configure.sh
diff options
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2020-04-27 02:55:01 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-04-27 02:55:01 +0100
commitd474d4c8e1f67743b84a6ad852d5d80a31a9103d (patch)
tree303b6fb0319344bac072cd9bdc64064c80b4dc1c /reproduce/software/shell/configure.sh
parenta21ea20c54628989b9737e9aa2ecd72806456307 (diff)
Aborting with informative error when GNU gettext not found
Until now, we wouldn't explicity check for GNU gettext. If it was present on the system, we would just add a link to it in Maneage's installation directory. However, in bug #58248, Boud noticed that Git (a basic software) actually needs it to complete its installation. Unfortunately we haven't had the tiem to include a build of Gettext in Maneage. Because it is mostly available on many systems, it hasn't been reported too commonly, it also has many dependencies which make it a little time consuming to install. So with this commit, we actually check for GNU gettext right after checking the compiler and if its not available an informative error message is written to inform the user of the problem, along with suggestions on fixing it (how to install GNU gettext from their package manager).
Diffstat (limited to 'reproduce/software/shell/configure.sh')
1 files changed, 39 insertions, 1 deletions
diff --git a/reproduce/software/shell/configure.sh b/reproduce/software/shell/configure.sh
index dd3b9bc..6f3ed7f 100755
--- a/reproduce/software/shell/configure.sh
+++ b/reproduce/software/shell/configure.sh
@@ -299,7 +299,7 @@ rm -f $testprog $testsource
# See if the C compiler can build static libraries
# ------------------------------------------------
# We are manually only working with shared libraries: because some
# high-level programs like Wget and cURL need dynamic linking and if we
# build the libraries statically, our own builds will be ignored and these
@@ -316,6 +316,44 @@ static_build=no
+# Check for GNU gettext
+# ---------------------
+# Some of the basic sofware need GNU gettext which we don't yet install.
+if type msgfmt > /dev/null 2>/dev/null; then has_gettext=1; fi
+if [ $has_gettext = 0 ]; then
+ cat <<EOF
+!!!!!!! GNU gettext NOT FOUND !!!!!!!
+Some of the core programs in Maneage require a running GNU gettext on the
+host. Unfortuantely we haven't had the time yet to include its installation
+in Maneage, but it is defined as task #15616 so we don't forget. Generally,
+GNU gettext is already available on many systems, so it hasn't been
+reported too commonly. But please consider helping in this if you have
+time and interest.
+Until we include gettext's installation in Maneage, please use your package
+manager to install GNU gettext, then re-run the configuration to
+continue. Here are the relevant commands on some common GNU/Linux
+distributions (you'll only need one of them, or a similar command, if you
+use another package manager):
+ apt install gettext
+ yum install gettext
+ pacman -S gettext
+ exit 1
# If we are on a Mac OS system
# ----------------------------