summaryrefslogtreecommitdiffstats
path: root/aclocal
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2002-11-20 02:57:38 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2002-11-20 02:57:38 +0000
commit0a9a0f5f49b2648ee6f1da431b2e0d1da4a53318 (patch)
treeec984b2e91a08cf88872a05dc096a77f3909896f /aclocal
parent2002-11-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-0a9a0f5f49b2648ee6f1da431b2e0d1da4a53318.tar.bz2
2002-11-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* aclocal/quoting.m4: Reworked (Part of fix to PR 312).
Diffstat (limited to 'aclocal')
-rw-r--r--aclocal/quoting.m419
1 files changed, 14 insertions, 5 deletions
diff --git a/aclocal/quoting.m4 b/aclocal/quoting.m4
index 53d98a4b87..0a95ae3e9b 100644
--- a/aclocal/quoting.m4
+++ b/aclocal/quoting.m4
@@ -1,17 +1,19 @@
dnl RTEMS_CONFIGURE_ARGS_QUOTE(dnl RETURN_VAR, [ADDITIONAL_CASES], [VAR_TO_PROCESS]])
dnl
-AC_DEFUN([RTEMS_CONFIGURE_ARGS_QUOTE],
+AC_DEFUN([_RTEMS_CONFIGURE_ARGS_QUOTE],
[
+$1_prune()
+{
# Remove --cache-file and --srcdir arguments so they do not pile up.
$1=
ac_prev=
- for ac_arg in m4_if([$3],,[$ac_configure_args],[[$]$3]); do
+ for ac_arg
+ do
if test -n "$ac_prev"; then
ac_prev=
continue
fi
- # the eval casts away sh quotes
- case `eval echo $ac_arg` in
+ case $ac_arg in
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
@@ -26,7 +28,14 @@ AC_DEFUN([RTEMS_CONFIGURE_ARGS_QUOTE],
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
;;
m4_if([$2],,,[$2])
- *) $1="$$1 $ac_arg" ;;
+ *) $1="$$1 '$ac_arg'" ;;
esac
done
+ export $1
+}
+])
+
+AC_DEFUN([RTEMS_CONFIGURE_ARGS_QUOTE],[
+m4_expand_once([_RTEMS_CONFIGURE_ARGS_QUOTE([$1],[$2])])
+eval $1_prune m4_if([$3],,[$ac_configure_args],[[$]$3])
])