Greetings,
Configure.in eventually gets parsed by /bin/sh, and on Free/Net/OpenBSD
/bin/sh is not synonymous with bash. Therefore, bash-isms in configure.in
can be problematic.
This patch eliminates a "test: : bad number" diagnostic on FreeBSD.
Contributed under LGPL3+/MPL.
Thanks,
Mike Eberdt
From b5aed1a20202589645e30ab3767f5c561b70e0af Mon Sep 17 00:00:00 2001
From: Mike Eberdt <libreme@comcast.net>
Date: Fri, 15 Jul 2011 12:09:31 -0700
Subject: [PATCH] Work around a bash-ism in configure.in
---
configure.in | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/configure.in b/configure.in
index 9ad2f52..71dbb5b 100755
--- a/configure.in
+++ b/configure.in
@@ -1309,7 +1309,10 @@ dnl check for required programs (grep, awk, sed, bash)
dnl ===================================================================
cat /dev/null > warn
-if test "$EUID" -eq "0" -a "z`uname -o 2>/dev/null`" = "zCygwin" ; then
+# $EUID is a bash-ism, so we can't assume its existence. Unfortunately, some
+# shells (e.g. FreeBSD sh) will _always_ evaluate both sides of "test X -a Y",
+# so we use "test X && test Y" to avoid on-screen spewage about a "bad number".
+if test "z`uname -o 2>/dev/null`" = "zCygwin" && test "$EUID" -eq 0; then
AC_MSG_ERROR([You must build LibreOffice as a normal user - not using an administrative
account])
fi
--
1.7.6
Context
- [Libreoffice] [PATCH] Work around a bash-ism in configure.in · Mike Eberdt
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.