From: filon Date: Tue, 12 Feb 2002 06:18:07 +0000 (+0000) Subject: - check gcc versiona and accordng to it apply CXX flags , or not X-Git-Tag: TeXmacs-0_3_5_12-3~1 X-Git-Url: http://git.pld-linux.org/cgi-bin/gitweb.cgi?p=packages%2FTeXmacs.git;a=commitdiff_plain;h=188eb81872cac833c60c5e02c43067e533bb90e0 - check gcc versiona and accordng to it apply CXX flags , or not Changed files: TeXmacs.spec -> 1.16 --- diff --git a/TeXmacs.spec b/TeXmacs.spec index d55cc75..ed15884 100644 --- a/TeXmacs.spec +++ b/TeXmacs.spec @@ -29,6 +29,8 @@ BuildRequires: libstdc++-devel Requires: tetex BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +%define _gcc_ver %(%{__cc} --version | cut -b 1) + %description GNU TeXmacs is a free what-you-see-is-what-you-get mathematical text editor, which was both inspired by TeX and GNU Emacs. The program @@ -64,10 +66,13 @@ autoconf cp -f /usr/share/automake/config.* . %configure -# %{__make} CXXFLAGS="%{rpmcflags} -fno-exceptions -fno-rtti -fno-implicit-templates" -# causes SIGSEV on gcc3 - +# adding this CXXFLAGS causes gcc3 SIGSEV, so use it only with gcc2.x +%if %{_gcc_ver} == 2 +%{__make} CXXFLAGS="%{rpmcflags} -fno-exceptions -fno-rtti -fno-implicit-templates" +%endif +%if %{_gcc_ver} == 3 %{__make} +%endif %install rm -rf $RPM_BUILD_ROOT