From ee0e288b13d58e039254fca45e7d776b2af9088f Mon Sep 17 00:00:00 2001
From: midipix <writeonce@midipix.org>
Date: Wed, 20 Apr 2016 17:42:26 -0400
Subject: build system: added empty --prefix and --exec-prefix support.

---
 configure | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'configure')

diff --git a/configure b/configure
index a06af66..ca10d90 100755
--- a/configure
+++ b/configure
@@ -105,8 +105,12 @@ verify_build_directory()
 common_defaults()
 {
 	# dirs
-	[ -z "$mb_prefix" ] 		&& mb_prefix='/usr/local'
-	[ -z "$mb_exec_prefix" ] 	&& mb_exec_prefix=$mb_prefix
+	[ -z "$mb_prefix" ] 		&& [ -z "$mb_prefix_set" ] \
+					&& mb_prefix='/usr/local'
+
+	[ -z "$mb_exec_prefix" ] 	&& [ -z "$mb_exec_prefix_set" ]	\
+					&& mb_exec_prefix=$mb_prefix
+
 	[ -z "$mb_bindir" ] 		&& mb_bindir=$mb_exec_prefix/bin
 	[ -z "$mb_libdir" ] 		&& mb_libdir=$mb_exec_prefix/lib
 	[ -z "$mb_includedir" ]		&& mb_includedir=$mb_prefix/include
@@ -386,9 +390,11 @@ for arg ; do
 
 		# dirs
 		--prefix=*)
+			mb_prefix_set=yes
 			mb_prefix=${arg#*=}
 			;;
 		--exec-prefix=*)
+			mb_exec_prefix_set=yes
 			mb_exec_prefix=${arg#*=}
 			;;
 		--bindir=*)
-- 
cgit v1.2.3