summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2002-11-05 18:34:36 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2002-11-05 18:34:36 +0000
commit9cf7774f2e4584c9513b3643e5d96ef69b19917a (patch)
tree73f879689427f63ae6da6fb750fc12f49c8705d4
parent2595580275f341cd56d4d64234969d746af787a0 (diff)
downloadrtems-9cf7774f2e4584c9513b3643e5d96ef69b19917a.tar.bz2
2002-11-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* acinclude.m4: Adapations to autoconf > 2.52.
-rw-r--r--ChangeLog4
-rw-r--r--acinclude.m464
2 files changed, 37 insertions, 31 deletions
diff --git a/ChangeLog b/ChangeLog
index a972c36e36..67ba02474e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-11-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * acinclude.m4: Adapations to autoconf > 2.52.
+
2002-11-01 Joel Sherrill <joel@OARcorp.com>
* ChangeLog: Corrected.
diff --git a/acinclude.m4 b/acinclude.m4
index b82a62cf82..cfc7837c0c 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -176,12 +176,12 @@ if test "$no_recursion" != yes; then
# Always prepend --prefix to ensure using the same prefix
# in subdir configurations.
- ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args"
+ ac_sub_configure_args="'--prefix=$prefix' $ac_sub_configure_args"
case "$$1_subdir" in
"." ) ;;
* )
- ac_sub_configure_args="$ac_sub_configure_args --with-target-subdir=$$1_subdir --exec-prefix=${prefix}/$$1_subdir"
+ ac_sub_configure_args="$ac_sub_configure_args '--with-target-subdir=$$1_subdir' '--exec-prefix=${prefix}/$$1_subdir'"
;;
esac
@@ -227,9 +227,9 @@ if test "$no_recursion" != yes; then
# The eval makes quoting arguments work.
ac_sub_configure_vars=
test -n "[$]CC_FOR_$2" && \
- ac_sub_configure_vars="CC='[$]CC_FOR_$2'"
+ ac_sub_configure_vars="'CC=[$]CC_FOR_$2'"
test -n "[$]CFLAGS_FOR_$2" && \
- ac_sub_configure_vars="$ac_sub_configure_vars CFLAGS='[$]CFLAGS_FOR_$2'"
+ ac_sub_configure_vars="$ac_sub_configure_vars 'CFLAGS=[$]CFLAGS_FOR_$2'"
eval $ac_sub_configure_vars \
$ac_sub_configure $ac_sub_configure_args \
--cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir ||
@@ -255,19 +255,35 @@ m4_divert_text([DEFAULTS],
m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS])
])
+AC_DEFUN([_RTEMS_CONFIGURE_ARGS_PRUNE],
+[
+ for ac_arg in m4_if([$3],,[$ac_configure_args],[[$]$3]); do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ configure
+ fi
+ # the eval casts away sh quotes
+ case `eval echo $ac_arg` in
+ -host* | --host* );;
+ -host ) ac_prev=host_alias;;
+ -target* | --target* );;
+ -target | --target ) ac_prev=target_alias;;
+ -build* | --build* );;
+ -build | --build ) ac_prev=build_alias;;
+ --cache* );;
+ *_alias=* );;
+ m4_if([$2],,,[$2])
+ *) $1="$$1 '$ac_arg'" ;;
+ esac
+ done
+])
+
AC_DEFUN(_RTEMS_BUILD_CONFIG_PREPARE,[
# Record the configure arguments in Makefile.
m4_ifdef([_RTEMS_BUILD_CONFIGDIRS_LIST],
[
-buildargs=`echo "${ac_configure_args}" | \
- sed -e 's/--no[[^ ]]*//' \
- -e 's/--cache[[a-z-]]*=[[^ ]]*//' \
- -e 's/--ho[[a-z-]]*=[[^ ]]*//' \
- -e 's/--bu[[a-z-]]*=[[^ ]]*//' \
- -e 's/--ta[[a-z-]]*=[[^ ]]*//' \
- -e 's/[[^ ]]*alias=[[^ ]]*//g'` ;
-
-buildargs="--host=${build} --build=${build} --target=${target_alias} ${buildargs}"
+_RTEMS_CONFIGURE_ARGS_PRUNE([buildargs])
+buildargs="'--host=${build}' '--build=${build}' '--target=${target_alias}' ${buildargs}"
AC_SUBST(buildargs)
build_subdir="."
@@ -310,15 +326,8 @@ AC_DEFUN(_RTEMS_HOST_CONFIG_PREPARE,[
m4_ifdef([_RTEMS_HOST_CONFIGDIRS_LIST],
[
# Record configure arguments in Makefile.
-hostargs=`echo "${ac_configure_args}" | \
- sed -e 's/--no[[^ ]]*//' \
- -e 's/--cache[[a-z-]]*=[[^ ]]*//' \
- -e 's/--ho[[a-z-]]*=[[^ ]]*//' \
- -e 's/--bu[[a-z-]]*=[[^ ]]*//' \
- -e 's/--ta[[a-z-]]*=[[^ ]]*//' \
- -e 's/[[^ ]]*alias=[[^ ]]*//g'` ;
-
-hostargs="--host=${host_alias} --build=${build} --target=${target_alias} ${hostargs}"
+_RTEMS_CONFIGURE_ARGS_PRUNE([hostargs])
+hostargs="'--host=${host_alias}' '--build=${build}' '--target=${target_alias}' ${hostargs}"
AC_SUBST(hostargs)
host_subdir="${host_alias}"
@@ -361,15 +370,8 @@ AC_DEFUN(_RTEMS_TARGET_CONFIG_PREPARE,[
m4_ifdef([_RTEMS_TARGET_CONFIGDIRS_LIST],
[
# Record the configure arguments in Makefile.
-targetargs=`echo "${ac_configure_args}" | \
- sed -e 's/--no[[^ ]]*//' \
- -e 's/--cache[[a-z-]]*=[[^ ]]*//' \
- -e 's/--ho[[a-z-]]*=[[^ ]]*//' \
- -e 's/--bu[[a-z-]]*=[[^ ]]*//' \
- -e 's/--ta[[a-z-]]*=[[^ ]]*//' \
- -e 's/[[^ ]]*alias=[[^ ]]*//g'` ;
-
-targetargs="--host=${target_alias} --build=${build} --target=${target_alias} ${targetargs}"
+_RTEMS_CONFIGURE_ARGS_PRUNE([targetargs])
+targetargs="'--host=${target_alias}' '--build=${build}' '--target=${target_alias}' ${targetargs}"
AC_SUBST(targetargs)
target_subdir="${target_alias}"