summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-01-21 11:42:42 (EST)
committer P. J. McDermott <pjm@nac.net>2012-01-21 11:42:42 (EST)
commitd31b721e987fe7d53cef087ed2f002b65a6a759e (patch)
tree36be42a90303666185ac0110d18e7627120b1bce /configure
parent0417faa1797e2cbe1793386bfc159391f919357d (diff)
Modify build system for "compilation" and libs.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 14 insertions, 2 deletions
diff --git a/configure b/configure
index b726c23..69af311 100755
--- a/configure
+++ b/configure
@@ -46,6 +46,8 @@ Installation directories:
default: /usr/local
--bindir=BINDIR install scripts in BINDIR
default: PREFIX/bin
+ --libdir=LIBDIR install library scripts in LIBDIR
+ default: PREFIX/lib
--mandir=MANDIR install manual pages in MANDIR
default: PREFIX/share/man
EOF
@@ -57,7 +59,7 @@ print_version()
${PACKAGE} ${VERSION} configure
Not generated by GNU Autoconf
-Copyright (C) 2012 Patrick "P. J." McDermott
+Copyright (C) 2011-2012 Patrick "P. J." McDermott
License: GNU GPL version 3 or later <http://www.gnu.org/licenses/gpl.html>.
This configure script is free software: you can redistribute and/or modify it.
There is NO WARRANTY, to the extent permitted by law.
@@ -65,7 +67,7 @@ EOF
}
opts=$(getopt -n "${0}" -o 'hVq' -l 'help,version,quiet' \
- -l 'srcdir:,prefix:,bindir:' -- "${@}")
+ -l 'srcdir:,prefix:,bindir:,libdir:,mandir:' -- "${@}")
if [ ${?} -ne 0 ]; then
print_usage "${0}" >&2
exit 1;
@@ -98,6 +100,11 @@ while true; do
BINDIR="\${PREFIX}/${2}"
shift 2
;;
+ --libdir)
+ # Leave PREFIX unexpanded for now, in case it isn't set yet.
+ LIBDIR="\${PREFIX}/${2}"
+ shift 2
+ ;;
--mandir)
# Leave PREFIX unexpanded for now, in case it isn't set yet.
MANDIR="\${PREFIX}/${2}"
@@ -127,11 +134,15 @@ fi
if [ -z "${BINDIR}" ]; then
BINDIR=${PREFIX}/bin
fi
+if [ -z "${LIBDIR}" ]; then
+ LIBDIR=${PREFIX}/lib
+fi
if [ -z "${MANDIR}" ]; then
MANDIR=${PREFIX}/man
fi
# Expand PREFIX if it's there.
eval "BINDIR=${BINDIR}"
+eval "LIBDIR=${LIBDIR}"
eval "MANDIR=${MANDIR}"
find_dependency()
@@ -173,6 +184,7 @@ s&@install@&${INSTALL} -c&
s&@srcdir@&${SRCDIR}&
s&@prefix@&${PREFIX}&
s&@bindir@&${BINDIR}&
+s&@libdir@&${LIBDIR}&
s&@mandir@&${MANDIR}&"
# Replace configuration variables in Makefile.in