configure: support --prefix, --libdir

Support --prefix, --libdir as a conventional way of specifying the default
installation directories. libdir is required to be a subdirectory of prefix
at this time.

Change-Id: If45d9e3129efcde83c05b7766accc9017988e715
diff --git a/configure b/configure
index 314f406..b7fac9a 100755
--- a/configure
+++ b/configure
@@ -8,7 +8,6 @@
 ##  file in the root of the source tree.
 ##
 
-
 #source_path="`dirname \"$0\"`"
 source_path=${0%/*}
 . "${source_path}/build/make/configure.sh"
@@ -369,11 +368,11 @@
     fi
     enabled child || cat <<EOF >> config.mk
 ifeq (\$(MAKECMDGOALS),dist)
-DESTDIR?=${DIST_DIR}
+DIST_DIR?=${DIST_DIR}
 else
-DESTDIR?=/usr/local
+DIST_DIR?=\$(DESTDIR)${prefix}
 endif
-DIST_DIR?=\$(DESTDIR)
+LIBSUBDIR=${libdir##${prefix}/}
 EOF
     enabled child || echo "CONFIGURE_ARGS?=${CONFIGURE_ARGS}" >> config.mk