aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-12-31 13:39:37 -0500
committerMike Frysinger <vapier@gentoo.org>2010-12-31 13:39:37 -0500
commit85cbd68c535cec4b9c6fa820808cada6caaf6a1f (patch)
tree954cef505e5867162db123601e53caeebb768f81
parentupdate ax_*.m4 files from upstream (diff)
downloadsandbox-85cbd68c535cec4b9c6fa820808cada6caaf6a1f.tar.gz
sandbox-85cbd68c535cec4b9c6fa820808cada6caaf6a1f.tar.bz2
sandbox-85cbd68c535cec4b9c6fa820808cada6caaf6a1f.zip
improve quote parsing for SANDBOX_CONFIGURE_OPTS
Only strip quotes from arguments which lack spaces in them. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--configure.ac10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 7a99005..e85d152 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,8 +6,14 @@ AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])
dnl we want to strip out quote chars and normalize whitespace
-sb_configure_opts=$(eval echo ${ac_configure_args})
-AC_DEFINE_UNQUOTED([SANDBOX_CONFIGURE_OPTS], ["${sb_configure_opts}"], [Arguments given to ./configure])
+sb_configure_opts=
+for a in ${ac_configure_args} ; do
+ case ${a} in
+ \'*\') a=${a#\'}; a=${a%\'};;
+ esac
+ AS_VAR_APPEND([sb_configure_opts], " $a")
+done
+AC_DEFINE_UNQUOTED([SANDBOX_CONFIGURE_OPTS], ["${sb_configure_opts# }"], [Arguments given to ./configure])
AC_MSG_CHECKING([environment state])
env 1>&AS_MESSAGE_LOG_FD