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 <libr...@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
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice