* configure.in (--enable-languages): Be more permissive about
authorDJ Delorie <dj@redhat.com>
Fri, 9 Nov 2001 02:21:21 +0000 (02:21 +0000)
committerDJ Delorie <dj@redhat.com>
Fri, 9 Nov 2001 02:21:21 +0000 (02:21 +0000)
syntax.  Check for empty lists better.  Warn about $LANGUAGES.

ChangeLog
configure.in

index d9c69e20b7278d9239187bbce96f644a777cabd3..14573efdc157c29a78e6f9a6860f0032a6f92f06 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-08  Phil Edwards  <pedwards@disaster.jaj.com>
+
+       * configure.in (--enable-languages): Be more permissive about
+       syntax.  Check for empty lists better.  Warn about $LANGUAGES.
+
 2001-11-06  Hans-Peter Nilsson  <hp@bitrange.com>
 
        * Makefile.in (MAKEINFO): Use "missing" for makeinfo older than 4.0.
index 4102e594b5d5a01d2d751c3d542cf1e2a4891f07..7b7e4bb73dea1695670346fe9bd8e8d08852e4c1 100644 (file)
@@ -976,18 +976,24 @@ fi
 # Look if the user specified --enable-languages="..."; if not, use
 # the environment variable $LANGUAGES if defined. $LANGUAGES might
 # go away some day.
+# NB:  embedded tabs in this IF block -- do not untabify
 if test x"${enable_languages+set}" != xset; then
        if test x"${LANGUAGES+set}" = xset; then
-               enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
+               enable_languages="${LANGUAGES}"
+               echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
        else
                enable_languages=all
        fi
 else
-       if test x"${enable_languages}" = x; then
-               echo configure.in: --enable-languages needs at least one argument 1>&2
+       if test x"${enable_languages}" = x ||
+          test x"${enable_languages}" = xyes;
+       then
+               echo configure.in: --enable-languages needs at least one language argument 1>&2
                exit 1
        fi
 fi
+enable_languages=`echo "${enable_languages}" | sed -e 's/[     ,][     ,]*/,/g' -e 's/,$//'`
+
 subdirs=
 for lang in ${srcdir}/gcc/*/config-lang.in ..
 do