[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Trunk build broken: Re: svn commit: r34258 - trunk

From: Jens Seidel <jensseidel_at_users.sf.net>
Date: Wed, 19 Nov 2008 14:27:57 +0100

On Tue, Nov 18, 2008 at 10:19:11PM -0800, Greg Stein wrote:
> Okay. Seems like I'll need to add some extra work to detect versions
> of GCC and add different flags based on that. I'll scrounge around the
> autoconf pages to see if there is an easy mechanism for that.

I had this problem in the past too and tried to parse g++ --version. This
failed on various distributions because of vendor strings (e.g. Debian)
in the output.

I solved it by using:
if test x$GXX = xyes; then
  AC_LANG_PUSH(C++)
  # Use -Wextra or the older -W ?
  CXXFLAGSold="$CXXFLAGS"
  CXXFLAGS="-Wextra $CXXFLAGS"
  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],,
   [CXXFLAGS="-W $CXXFLAGSold"
    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],,CXXFLAGS="$CXXFLAGSold")])
fi
 
So I just tested whether an empty file can be compiled and changed the compiler
flags if not.

Jens

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-11-19 14:29:38 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.