diff mbox

PATCH to configure.ac to fix --enable-languages=all

Message ID 50464A81.2070103@redhat.com
State New
Headers show

Commit Message

Jason Merrill Sept. 4, 2012, 6:37 p.m. UTC
I configure GCC with --enable-languages=all,obj-c++ for testing, and 
this started breaking recently, because I ended up with 'c' twice in the 
list of languages, so reconfiguring breaks.  This seems to be because 
r189080 didn't adjust the "all" case along with the language name case.

Tested x86_64-pc-linux-gnu, applying to trunk as obvious.
diff mbox

Patch

commit 1e901c1bd7814cd5e3b6800fe035255ab6c3976f
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Sep 4 13:25:21 2012 -0400

    	* configure.ac: Fix --enable-languages=all.

diff --git a/configure b/configure
index 0f655b8..cd06e4e 100755
--- a/configure
+++ b/configure
@@ -6112,6 +6112,7 @@  if test -d ${srcdir}/gcc; then
 	  boot_language=yes
 	fi
 
+        add_this_lang=no
         case ,${enable_languages}, in
           *,${language},*)
             # Language was explicitly selected; include it
@@ -6122,10 +6123,9 @@  if test -d ${srcdir}/gcc; then
             ;;
           *,all,*)
             # 'all' was selected, select it if it is a default language
-            add_this_lang=${build_by_default}
-            ;;
-          *)
-            add_this_lang=no
+	    if test "$language" != "c"; then
+	      add_this_lang=${build_by_default}
+	    fi
             ;;
         esac
 
diff --git a/configure.ac b/configure.ac
index 02174b3..9bee624 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1758,6 +1758,7 @@  if test -d ${srcdir}/gcc; then
 	  boot_language=yes
 	fi
 
+        add_this_lang=no
         case ,${enable_languages}, in
           *,${language},*)
             # Language was explicitly selected; include it
@@ -1768,10 +1769,9 @@  if test -d ${srcdir}/gcc; then
             ;;
           *,all,*)
             # 'all' was selected, select it if it is a default language
-            add_this_lang=${build_by_default}
-            ;;
-          *)
-            add_this_lang=no
+	    if test "$language" != "c"; then
+	      add_this_lang=${build_by_default}
+	    fi
             ;;
         esac