From f6fe6abdcb5372f0bad1dba0b77dedc8f95c8a78 Mon Sep 17 00:00:00 2001 From: Honggyu Kim Date: Fri, 29 Dec 2023 10:16:39 +0900 Subject: [PATCH] build: Make autogen.sh accept quoted extra options The current autogen.sh script doesn't allow receiving quoted extra options. If someone wants to pass extra CFLAGS that is split into multiple options with a whitespace, then a quote is required. However, the configure inside autogen.sh fails in this case as follows. $ ./autogen.sh CFLAGS="-Dmmap=cxl_mmap -Dmunmap=cxl_munmap" autoconf ./configure --enable-autogen CFLAGS=-Dmmap=cxl_mmap -Dmunmap=cxl_munmap configure: error: unrecognized option: `-Dmunmap=cxl_munmap' Try `./configure --help' for more information Error 0 in ./configure It's because the quote discarded unexpectedly when calling configure. This patch is to fix this problem. Signed-off-by: Honggyu Kim --- autogen.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autogen.sh b/autogen.sh index 75f32da6..c5325fc9 100755 --- a/autogen.sh +++ b/autogen.sh @@ -9,8 +9,8 @@ for i in autoconf; do fi done -echo "./configure --enable-autogen $@" -./configure --enable-autogen $@ +echo "./configure --enable-autogen \"$@\"" +./configure --enable-autogen "$@" if [ $? -ne 0 ]; then echo "Error $? in ./configure" exit 1