[PATCH 4/4] configure: Fixes for Solaris

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

 



From: Dennis Stosberg <dennis@xxxxxxxxxxxx>

- Solaris' /bin/sh will not find a function if there is a variable 
  with the same name.
- 'test -z $var' fails if $var is empty.  Needs to be 'test -z "$var"' 

Signed-off-by: Dennis Stosberg <dennis@xxxxxxxxxxxx>
---

 config-lib.sh |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/config-lib.sh b/config-lib.sh
index 0bcd4c3..4dd4d00 100755
--- a/config-lib.sh
+++ b/config-lib.sh
@@ -181,7 +181,7 @@ add_library() { # --with
 	lib_help="$lib_help
 $desc [$hdefault]"
 	switches="$switches switch_lib \"$name\" \"$switch\" \"\$ac_option\" || "
-	mkvars="$mkvars mkvar \"\$$name\" \"$mkvar\";"
+	mkvars="$mkvars print_mkvar \"\$$name\" \"$mkvar\";"
 	eval "$name=$default"
 }
 
@@ -196,7 +196,7 @@ add_feature() { # --enable
 	feature_help="$feature_help
 $desc [$hdefault]"
 	switches="$switches switch_feature \"$name\" \"$switch\" \"\$ac_option\" || "
-	mkvars="$mkvars mkvar \"\$$name\" \"$mkvar\";"
+	mkvars="$mkvars print_mkvar \"\$$name\" \"$mkvar\";"
 	eval "$name=$default"
 }
 
@@ -226,7 +226,7 @@ switch_feature() {
 	return 0
 }
 
-mkvar() {
+print_mkvar() {
 	value="$1"; shift; mkvar="$1"; shift
 	noval=""; yesval="ConfigureYesPlease"
 	case $mkvar in
@@ -533,15 +533,15 @@ PERL_PATH = $_perl
 INSTALL = $_install
 
 EOF
-		test -z $_prefix || echo "prefix = $_prefix"
-		test -z $_bindir || echo "bindir = $_bindir"
-		test -z $_gitexecdir || echo "gitexecdir = $_gitexecdir"
-		test -z $_mandir || ( echo "mandir = $_mandir" && echo "export mandir" )
-		test -z $_templatedir || echo "template_dir = $_templatedir"
-		test -z $_gitpythondir || echo "GIT_PYTHON_DIR = $_gitpythondir"
-
-		test -z $_python || echo "PYTHON_PATH = $_python"
-		test -z $_no_python || echo "NO_PYTHON = $_no_python"
+		test -z "$_prefix" || echo "prefix = $_prefix"
+		test -z "$_bindir" || echo "bindir = $_bindir"
+		test -z "$_gitexecdir" || echo "gitexecdir = $_gitexecdir"
+		test -z "$_mandir" || ( echo "mandir = $_mandir" && echo "export mandir" )
+		test -z "$_templatedir" || echo "template_dir = $_templatedir"
+		test -z "$_gitpythondir" || echo "GIT_PYTHON_DIR = $_gitpythondir"
+
+		test -z "$_python" || echo "PYTHON_PATH = $_python"
+		test -z "$_no_python" || echo "NO_PYTHON = $_no_python"
 
 		echo
 		eval "$mkvars"
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]