Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-03-22 12:25:20 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-03-22 12:25:20 +0300
commitfe508576ef1f815b22177d7597796886b91ea0c8 (patch)
tree885adbb929453bbbee04db48bdbbafec4e29205e /config-ml.in
parent445036bb9882485133750a14a5b3da30efeae2df (diff)
Sync toplevel with upstream GCC.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'config-ml.in')
-rw-r--r--config-ml.in74
1 files changed, 41 insertions, 33 deletions
diff --git a/config-ml.in b/config-ml.in
index 11983461c..5e519942b 100644
--- a/config-ml.in
+++ b/config-ml.in
@@ -2,7 +2,7 @@
# wanting multilib support.
#
# Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2010, 2011, 2014 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@
# user select which libraries s/he really wants.
#
# Subdirectories wishing to use multilib should put the following lines
-# in the "post-target" section of configure.in.
+# in the "post-target" section of configure.ac.
#
# if [ "${srcdir}" = "." ] ; then
# if [ "${with_target_subdir}" != "." ] ; then
@@ -105,31 +105,34 @@ ml_realsrcdir=${srcdir}
# Scan all the arguments and set all the ones we need.
-ml_verbose=--verbose
-for option in ${ac_configure_args}
-do
- # strip single quotes surrounding individual options
- case $option in
- \'*\') eval option=$option ;;
- esac
-
- case $option in
- --*) ;;
- -*) option=-$option ;;
- esac
-
- case $option in
- --*=*)
+scan_arguments ()
+{
+ ml_verbose=--verbose
+ for option
+ do
+ # Strip single quotes surrounding individual options, that is, remove one
+ # level of shell quoting for these.
+ case $option in
+ \'*\') eval option=$option ;;
+ esac
+
+ case $option in
+ --*) ;;
+ -*) option=-$option ;;
+ esac
+
+ case $option in
+ --*=*)
optarg=`echo $option | sed -e 's/^[^=]*=//'`
;;
- esac
+ esac
- case $option in
- --disable-*)
+ case $option in
+ --disable-*)
enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
eval $enableopt=no
;;
- --enable-*)
+ --enable-*)
case "$option" in
*=*) ;;
*) optarg=yes ;;
@@ -139,32 +142,37 @@ do
# Don't undo its work.
case $enableopt in
enable_shared | enable_static) ;;
- *) eval $enableopt="$optarg" ;;
+ *) eval $enableopt='$optarg' ;;
esac
;;
- --norecursion | --no-recursion)
+ --norecursion | --no-recursion)
ml_norecursion=yes
;;
- --silent | --sil* | --quiet | --q*)
+ --silent | --sil* | --quiet | --q*)
ml_verbose=--silent
;;
- --verbose | --v | --verb*)
+ --verbose | --v | --verb*)
ml_verbose=--verbose
;;
- --with-*)
+ --with-*)
case "$option" in
*=*) ;;
*) optarg=yes ;;
esac
withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
- eval $withopt="$optarg"
+ eval $withopt='$optarg'
;;
- --without-*)
+ --without-*)
withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
eval $withopt=no
;;
- esac
-done
+ esac
+ done
+}
+# Use eval to properly handle configure arguments such as
+# --enable-foo='--enable-a=1 --enable-b=2 --enable-c=3'.
+eval scan_arguments "${ac_configure_args}"
+unset scan_arguments
# Only do this if --enable-multilib.
if [ "${enable_multilib}" = yes ]; then
@@ -174,8 +182,8 @@ if [ "${enable_multilib}" = yes ]; then
# ${with_multisubdir} tells us we're in the right branch, but we could be
# in a subdir of that.
# ??? The previous version could void this test by separating the process into
-# two files: one that only the library's toplevel configure.in ran (to
-# configure the multilib subdirs), and another that all configure.in's ran to
+# two files: one that only the library's toplevel configure.ac ran (to
+# configure the multilib subdirs), and another that all configure.ac's ran to
# update the Makefile. It seemed reasonable to collapse all multilib support
# into one file, but it does leave us with having to perform this test.
ml_toplevel_p=no
@@ -860,7 +868,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
--with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
- ${ac_configure_args} ${ml_config_env} ${ml_srcdiroption} ; then
+ "${ac_configure_args}" ${ml_config_env} ${ml_srcdiroption} ; then
true
else
exit 1