summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 10 insertions, 8 deletions
diff --git a/configure b/configure
index 8cdb7d8..5156c91 100755
--- a/configure
+++ b/configure
@@ -7,13 +7,16 @@
set -eu
-# Print the help message()
+# Get the relative path to the source tree based on how the script was run
+DIR=$(dirname -- "$0")
+
+# Print the help message
help() {
cat <<EOF
Usage:
\$ $0 [--enable-*|--disable-*] [--with-*|--without-*] [CC=...] [...]
- \$ $MAKE $j
+ \$ $MAKE -j$(nproc)
Variables set in the environment or on the command line will be picked up:
@@ -57,11 +60,13 @@ Packaging:
Set the installation prefix (default: /usr)
--mandir=/path
Set the man page directory (default: \$PREFIX/share/man)
+ --version=X.Y.Z
+ Set the version string (default: $("$DIR/build/version.sh"))
This script is a thin wrapper around a makefile-based configuration system.
Any other arguments will be passed directly to the $MAKE invocation, e.g.
- \$ $0 $j V=1
+ \$ $0 -j$(nproc) V=1
EOF
}
@@ -134,7 +139,7 @@ for arg; do
printf 'warning: Treating "%s" like "%s"\n' "$old" "$arg" >&2
;;
esac
- ;;
+ ;;
esac
case "$arg" in
@@ -165,7 +170,7 @@ for arg; do
esac
;;
- --prefix=*|--mandir=*)
+ --prefix=*|--mandir=*|--version=*)
set -- "$@" "$NAME=$value"
;;
@@ -188,9 +193,6 @@ for arg; do
esac
done
-# Get the relative path to the source tree based on how the script was run
-DIR=$(dirname -- "$0")
-
# Set up symbolic links for out-of-tree builds
for f in Makefile build completions docs src tests; do
test -e "$f" || ln -s "$DIR/$f" "$f"