diff options
author | Luke Shumaker <luke@HP-dv6426us-u904.(none)> | 2009-11-02 20:33:40 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-06-26 00:30:18 -0600 |
commit | 419801528066ea61546cde30c9f9f7f953e823b5 (patch) | |
tree | 55f9196d32710272fb07080ecf0863ce9e63ba76 /configure | |
parent | 2db6b833176b0a0a55de21a38a83bd97df537191 (diff) |
It appears I'd previously edited other files, but as far as I knew a moment ago:
The Makefiles have had support for DESTDIR for some time. I just realised configure didn't
Which lead me to find some bugs in configure's option handling.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -17,13 +17,15 @@ name='configure' # Luke's configureation script # along with this program; see the file COPYING. # If not, see <http://www.gnu.org/licenses>. + _DESTDIR='' _prefix='/usr/local' _exec_prefix='$(prefix)' _bindir='$(exec_prefix)/bin' _sbindir='$(exec_prefix)/sbin' _libexecdir='$(exec_prefix)/libexec' _srcdir=$(readlink -f `dirname "$0"`) -vars='prefix exec_prefix bindir sbindir libexecdir srcdir' + _CONFIG="$@" +vars='DESTDIR prefix exec_prefix bindir sbindir libexecdir srcdir CONFIG' if [ -f "$_srcdir/config" ]; then . "$_srcdir/config"; fi error() { @@ -31,9 +33,11 @@ error() { exit 1 } -args=`getopt -n "$name" -o "${sopt}" -l "${lopt}${vars}" -- "$@"` +varargs=`echo "$vars " | sed -e 's/ */:,/g' -e 's/,$//'` +args=`getopt -n "$name" -o "${sopt}" -l "${lopt}${varargs}" -- "$@"` if [ $? == 0 ]; then set -- $args + echo "$@" while [ $# -gt 0 ]; do case "$1" in --) break;; --*) @@ -46,13 +50,14 @@ if [ $? == 0 ]; then fi done if [ "$match" == 'true' ]; then - val="$2" + shift + val="$1" eval _$var0=$val else - error "option \`$1' not recognized"; + error "unrecognized option \`$1'"; fi :;; - *) error "option \`$1' not recognized";; + *) error "unrecognized option \`$1'"; esac shift done |