diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2000-12-12 20:16:17 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2000-12-12 20:16:17 +0000 |
commit | 2a50f859e32188399c7c11f64bebc2f7a3260e97 (patch) | |
tree | 2b1395040ab7dbdb84571c13d7bae50fcdc690af | |
parent | e793c60979f7a1570e33810541b301b861fb64a6 (diff) | |
download | gcc-2a50f859e32188399c7c11f64bebc2f7a3260e97.zip gcc-2a50f859e32188399c7c11f64bebc2f7a3260e97.tar.gz gcc-2a50f859e32188399c7c11f64bebc2f7a3260e97.tar.bz2 |
configure.in: Disable language-specific target libraries for languages that aren't enabled.
* configure.in: Disable language-specific target libraries for
languages that aren't enabled.
From-SVN: r38206
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.in | 49 |
2 files changed, 54 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2000-12-12 Alexandre Oliva <aoliva@redhat.com> + + * configure.in: Disable language-specific target libraries for + languages that aren't enabled. + 2000-12-10 Anthony Green <green@redhat.com> * configure.in: Define libgcj. Disable libgcj target libraries for diff --git a/configure.in b/configure.in index c350b34..cf3d57b 100644 --- a/configure.in +++ b/configure.in @@ -980,6 +980,55 @@ if [ x$with_gnu_as = xno ]; then noconfigdirs="$noconfigdirs gas" fi +# Figure out what language subdirectories are present. +# Look if the user specified --enable-languages="..."; if not, use +# the environment variable $LANGUAGES if defined. $LANGUAGES might +# go away some day. +if test x"${enable_languages+set}" != xset; then + if test x"${LANGUAGES+set}" = xset; then + enable_languages="`echo ${LANGUAGES} | tr ' ' ','`" + 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 + exit 1 + fi +fi +subdirs= +for lang in ${srcdir}/gcc/*/config-lang.in .. +do + case $lang in + ..) ;; + # The odd quoting in the next line works around + # an apparent bug in bash 1.12 on linux. + ${srcdir}/gcc/[*]/config-lang.in) ;; + *) + lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` + this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` + build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` + if test "x$lang_alias" = x + then + echo "$lang doesn't set \$language." 1>&2 + exit 1 + fi + case ${build_by_default},${enable_languages}, in + *,$lang_alias,*) add_this_lang=yes ;; + no,*) add_this_lang=no ;; + *,all,*) add_this_lang=yes ;; + *) add_this_lang=no ;; + esac + if test x"${add_this_lang}" = xyes; then + eval target_libs='"$target_libs "'\"$this_lang_libs\" + else + eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs\" + fi + ;; + esac +done + + # Remove the entries in $skipdirs and $noconfigdirs from $configdirs and # $target_configdirs. # If we have the source for $noconfigdirs entries, add them to $notsupp. |