summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-06-07 21:57:33 -0700
committerGarrett D'Amore <garrett@damore.org>2016-06-07 21:57:33 -0700
commit8be14c301c7bd15a7cbc67c682c3fc14f91edf8c (patch)
tree5b7bb6870beeb014fd22889236db17e673ed3c29
parent5ca48a1166c87986a117af726c52941cf0896d80 (diff)
downloadnanomsg-8be14c301c7bd15a7cbc67c682c3fc14f91edf8c.tar.gz
fixes #761 ./configure syntax error with dash
-rwxr-xr-xconfigure12
1 files changed, 7 insertions, 5 deletions
diff --git a/configure b/configure
index bcbf7dc..ff5ba72 100755
--- a/configure
+++ b/configure
@@ -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