Skip to content

Commit

Permalink
Actually support prefix arg in configure
Browse files Browse the repository at this point in the history
  • Loading branch information
abbec committed May 14, 2024
1 parent b5de6c2 commit 8624c6b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Options:

enable_syntax=1
enable_asan=0
prefix=
while [ "$#" -gt 0 ]; do
case $1 in
--disable-syntax)
Expand All @@ -27,6 +28,16 @@ while [ "$#" -gt 0 ]; do
shift 1
;;

--prefix)
prefix="$2"
shift 2
;;

--prefix=*)
prefix="${1#*=}"
shift 1
;;

-h|--help)
echo "$_usage"
exit
Expand Down Expand Up @@ -76,6 +87,10 @@ if [ "$enable_asan" -ne 0 ]; then
echo "ASAN = true" >> config.mk
fi

if [ -n "$prefix" ]; then
echo "setting prefix to \"$prefix\""
echo "prefix = $prefix" >> config.mk
fi

echo "#endif" >> src/config.h
echo "wrote src/config.h"
Expand Down

0 comments on commit 8624c6b

Please sign in to comment.