diff options
author | Garrett D'Amore <garrett@damore.org> | 2016-06-07 21:57:33 -0700 |
---|---|---|
committer | Garrett D'Amore <garrett@damore.org> | 2016-06-07 21:57:33 -0700 |
commit | 8be14c301c7bd15a7cbc67c682c3fc14f91edf8c (patch) | |
tree | 5b7bb6870beeb014fd22889236db17e673ed3c29 | |
parent | 5ca48a1166c87986a117af726c52941cf0896d80 (diff) | |
download | nanomsg-8be14c301c7bd15a7cbc67c682c3fc14f91edf8c.tar.gz |
fixes #761 ./configure syntax error with dash
-rwxr-xr-x | configure | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -73,8 +73,8 @@ help() { exit 1 } -CMAKE_ARGS=() # Argument parsing +PREFIX=/usr/local while [ -n "$1" ]; do case "$1" in --with-cmake) @@ -86,12 +86,14 @@ while [ -n "$1" ]; do shift ;; --prefix) - CMAKE_ARGS+=( "-DCMAKE_INSTALL_PREFIX=$2" ) + if [ -z "$2" ]; then + help + fi + PREFIX="$2" shift 2 ;; --prefix=*) - strip_arg "$1" PFX - CMAKE_ARGS+=( "-DCMAKE_INSTALL_PREFIX=$PFX" ) + strip_arg "$1" PREFIX shift ;; *) @@ -111,4 +113,4 @@ fi GENERATOR="Unix Makefiles" -"$CMAKE" "${CMAKE_ARGS[@]}" -G "$GENERATOR" $SRCDIR +"$CMAKE" -G "$GENERATOR" "-DCMAKE_INSTALL_PREFIX=$PREFIX" $SRCDIR |