Index: SPECS/gcc41.spec
===================================================================
--- SPECS.orig/gcc41.spec
+++ SPECS/gcc41.spec
@@ -9,7 +9,9 @@
 %else
 %define build_ada 0
 %endif
+%define build_fortran 1
 %define build_java 1
+%define build_objc 1
 %ifarch s390x
 %define multilib_32_arch s390
 %endif
@@ -569,11 +571,20 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="$
 	../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
 	--enable-shared --enable-threads=posix --enable-checking=release \
 	--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \
-%if !%{build_ada}
-	--enable-languages=c,c++,objc,obj-c++,java,fortran \
-%else
-	--enable-languages=c,c++,objc,obj-c++,java,fortran,ada \
+	--enable-languages=c,c++\
+%if %{build_objc}
+,objc,obj-c++\
+%endif
+%if %{build_java}
+,java\
+%endif
+%if %{build_fortran}
+,fortran\
+%endif
+%if %{build_ada}
+,ada\
 %endif
+ \
 %if !%{build_java}
 	--disable-libgcj \
 %else
@@ -721,7 +732,9 @@ FULLEPATH=$RPM_BUILD_ROOT%{_prefix}/libe
 ln -sf gcc $RPM_BUILD_ROOT%{_prefix}/bin/cc
 mkdir -p $RPM_BUILD_ROOT/lib
 ln -sf ..%{_prefix}/bin/cpp $RPM_BUILD_ROOT/lib/cpp
+%if %{build_fortran}
 ln -sf gfortran $RPM_BUILD_ROOT%{_prefix}/bin/f95
+%endif
 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
 gzip -9 $RPM_BUILD_ROOT%{_infodir}/*.info*
 ln -sf gcc $RPM_BUILD_ROOT%{_prefix}/bin/gnatgcc
@@ -824,9 +837,13 @@ fi
 
 pushd $FULLPATH
 if [ "%{_lib}" = "lib" ]; then
+%if %{build_objc}
 ln -sf ../../../libobjc.so.1 libobjc.so
+%endif
 ln -sf ../../../libstdc++.so.6.* libstdc++.so
+%if %{build_fortran}
 ln -sf ../../../libgfortran.so.1.* libgfortran.so
+%endif
 ln -sf ../../../libgomp.so.1.* libgomp.so
 ln -sf ../../../libmudflap.so.0.* libmudflap.so
 ln -sf ../../../libmudflapth.so.0.* libmudflapth.so
@@ -844,9 +861,13 @@ ln -sf ../../../../libgnat-*.so libgnat-
 cd ..
 %endif
 else
+%if %{build_objc}
 ln -sf ../../../../%{_lib}/libobjc.so.1 libobjc.so
+%endif
 ln -sf ../../../../%{_lib}/libstdc++.so.6.* libstdc++.so
+%if %{build_fortran}
 ln -sf ../../../../%{_lib}/libgfortran.so.1.* libgfortran.so
+%endif
 ln -sf ../../../../%{_lib}/libgomp.so.1.* libgomp.so
 ln -sf ../../../../%{_lib}/libmudflap.so.0.* libmudflap.so
 ln -sf ../../../../%{_lib}/libmudflapth.so.0.* libmudflapth.so
@@ -869,17 +890,25 @@ mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
 %endif
 mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libstdc++.*a $FULLLPATH/
 mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libsupc++.*a .
+%if %{build_fortran}
 mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgfortran.*a .
 mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgfortranbegin.*a .
+%endif
+%if %{build_objc}
 mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libobjc.*a .
+%endif
 mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgomp.*a .
 mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libmudflap{,th}.*a .
 mv -f $RPM_BUILD_ROOT%{_prefix}/include/mf-runtime.h include/
 
 %ifarch sparc ppc
+%if %{build_objc}
 ln -sf ../../../../../lib64/libobjc.so.1 64/libobjc.so
+%endif
 ln -sf ../`echo ../../../../lib/libstdc++.so.6.* | sed s~/lib/~/lib64/~` 64/libstdc++.so
+%if %{build_fortran}
 ln -sf ../`echo ../../../../lib/libgfortran.so.1.* | sed s~/lib/~/lib64/~` 64/libgfortran.so
+%endif
 ln -sf ../`echo ../../../../lib/libgomp.so.1.* | sed s~/lib/~/lib64/~` 64/libgomp.so
 ln -sf ../`echo ../../../../lib/libmudflap.so.0.* | sed s~/lib/~/lib64/~` 64/libmudflap.so
 ln -sf ../`echo ../../../../lib/libmudflapth.so.0.* | sed s~/lib/~/lib64/~` 64/libmudflapth.so
@@ -891,9 +920,13 @@ ln -sf lib32/libgcj_bc.so libgcj_bc.so
 ln -sf ../lib64/libgcj_bc.so 64/libgcj_bc.so
 %endif
 mv -f $RPM_BUILD_ROOT%{_prefix}/lib64/libsupc++.*a 64/
+%if %{build_fortran}
 mv -f $RPM_BUILD_ROOT%{_prefix}/lib64/libgfortran.*a 64/
 mv -f $RPM_BUILD_ROOT%{_prefix}/lib64/libgfortranbegin.*a 64/
+%endif
+%if %{build_objc}
 mv -f $RPM_BUILD_ROOT%{_prefix}/lib64/libobjc.*a 64/
+%endif
 mv -f $RPM_BUILD_ROOT%{_prefix}/lib64/libgomp.*a 64/
 mv -f $RPM_BUILD_ROOT%{_prefix}/lib64/libmudflap{,th}.*a 64/
 ln -sf lib32/libstdc++.a libstdc++.a
@@ -901,9 +934,13 @@ ln -sf ../lib64/libstdc++.a 64/libstdc++
 %endif
 %ifarch %{multilib_64_archs}
 mkdir -p 32
+%if %{build_objc}
 ln -sf ../../../../libobjc.so.1 32/libobjc.so
+%endif
 ln -sf ../`echo ../../../../lib64/libstdc++.so.6.* | sed s~/../lib64/~/~` 32/libstdc++.so
+%if %{build_fortran}
 ln -sf ../`echo ../../../../lib64/libgfortran.so.1.* | sed s~/../lib64/~/~` 32/libgfortran.so
+%endif
 ln -sf ../`echo ../../../../lib64/libgomp.so.1.* | sed s~/../lib64/~/~` 32/libgomp.so
 ln -sf ../`echo ../../../../lib64/libmudflap.so.0.* | sed s~/../lib64/~/~` 32/libmudflap.so
 ln -sf ../`echo ../../../../lib64/libmudflapth.so.0.* | sed s~/../lib64/~/~` 32/libmudflapth.so
@@ -913,9 +950,13 @@ ln -sf ../`echo ../../../../lib64/libgcj
 ln -sf ../`echo ../../../../lib64/libgij.so.8rh.* | sed s~/../lib64/~/~` 32/libgij.so
 %endif
 mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libsupc++.*a 32/
+%if %{build_fortran}
 mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libgfortran.*a 32/
 mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libgfortranbegin.*a 32/
+%endif
+%if %{build_objc}
 mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libobjc.*a 32/
+%endif
 mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libgomp.*a 32/
 mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libmudflap{,th}.*a 32/
 %endif
@@ -940,10 +981,14 @@ strip -g `find . \( -name libgfortran.a 
 		    -o -name libmudflap.a -o -name libmudflapth.a \
 		    -o -name libgcc.a -o -name libgcov.a \) -a -type f`
 popd
+%if %{build_fortran}
 chmod 755 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgfortran.so.1.*
+%endif
 chmod 755 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgomp.so.1.*
 chmod 755 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libmudflap{,th}.so.0.*
+%if %{build_objc}
 chmod 755 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libobjc.so.1.*
+%endif
 
 %if %{build_ada}
 chmod 755 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgnarl*so*
@@ -1303,6 +1348,7 @@ fi
 %endif
 %doc rpm.doc/changelogs/libstdc++-v3/ChangeLog* libstdc++-v3/README* libstdc++-v3/docs/html/
 
+%if %{build_objc}
 %files objc
 %defattr(-,root,root)
 %dir %{_prefix}/lib/gcc
@@ -1339,7 +1385,9 @@ fi
 %files -n libobjc
 %defattr(-,root,root)
 %{_prefix}/%{_lib}/libobjc.so.1*
+%endif
 
+%if %{build_fortran}
 %files gfortran
 %defattr(-,root,root)
 %{_prefix}/bin/gfortran
@@ -1378,6 +1426,7 @@ fi
 %files -n libgfortran
 %defattr(-,root,root)
 %{_prefix}/%{_lib}/libgfortran.so.1*
+%endif
 
 %if %{build_java}
 %files java
