From c0320ed08998c3000bd63df921614988688dc28c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 24 Jan 2009 18:11:43 +0000 Subject: [PATCH] - Don't claim C++ compiler exists if it's not installed, as this breaks autoconf and (in particular) libtool. --- mingw32-filesystem.spec | 8 ++++++-- mingw32-macros.mingw32 | 16 +++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/mingw32-filesystem.spec b/mingw32-filesystem.spec index 429016e..faf6ae5 100644 --- a/mingw32-filesystem.spec +++ b/mingw32-filesystem.spec @@ -1,8 +1,8 @@ %define debug_package %{nil} Name: mingw32-filesystem -Version: 42 -Release: 1%{?dist} +Version: 43 +Release: 6%{?dist} Summary: MinGW base filesystem and environment Group: Development/Libraries @@ -145,6 +145,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jan 24 2009 Richard W.M. Jones - 43-6 +- Don't claim C++ compiler exists if it's not installed, as this + breaks autoconf and (in particular) libtool. + * Wed Jan 14 2009 Richard W.M. Jones - 42-1 - Add pseudo-provides secur32.dll diff --git a/mingw32-macros.mingw32 b/mingw32-macros.mingw32 index 6555424..cbc05ca 100644 --- a/mingw32-macros.mingw32 +++ b/mingw32-macros.mingw32 @@ -55,16 +55,22 @@ %_mingw32_env HOST_CC=gcc; export HOST_CC; \ PKG_CONFIG_PATH="%{_mingw32_libdir}/pkgconfig"; export PKG_CONFIG_PATH; \ - CC="${MINGW32_CC:-%_mingw32_cc}"; export CC; \ - CXX="${MINGW32_CXX:-%_mingw32_cxx}"; export CXX; \ - CFLAGS="${MINGW32_CFLAGS:-%_mingw32_cflags}"; export CFLAGS; \ - CXXFLAGS="${MINGW32_CXXFLAGS:-%_mingw32_cflags}"; export CXXFLAGS; \ _PREFIX="%{_bindir}/%{_mingw32_target}-"; \ - for i in `ls ${_PREFIX}*|egrep -v "gcc-"`; do \ + for i in `ls -1 ${_PREFIX}* | grep -v 'gcc-'`; do \ x=`echo $i|sed "s,${_PREFIX},,"|tr "a-z+-" "A-ZX_"`; \ declare -x $x="$i" ; export $x; \ done; \ unset _PREFIX; \ + CC="${MINGW32_CC:-%_mingw32_cc}"; export CC; \ + CFLAGS="${MINGW32_CFLAGS:-%_mingw32_cflags}"; export CFLAGS; \ + if [ -x "%{_bindir}/%{_mingw32_cxx}" ]; then \ + CXX="${MINGW32_CXX:-%_mingw32_cxx}"; export CXX; \ + CXXFLAGS="${MINGW32_CXXFLAGS:-%_mingw32_cflags}"; export CXXFLAGS; \ + else \ + CXX=; export CXX; \ + ac_cv_prog_CXX=no; export ac_cv_prog_CXX; \ + CXXFLAGS=; export CXXFLAGS; \ + fi; \ for i in `ls %{_mingw32_bindir}/*|grep -- "-config\$"` ; do \ x=`basename $i|tr "a-z+-" "A-ZX_"`; \ declare -x $x="$i" ; export $x; \