You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/10/25 04:22:51 UTC

svn commit: r1535610 - in /subversion/trunk: Makefile.in build.conf configure.ac

Author: breser
Date: Fri Oct 25 02:22:50 2013
New Revision: 1535610

URL: http://svn.apache.org/r1535610
Log:
Filter out -no-cpp-precomp from flags passed to SWIG.

This is necessary since APR for whatever reason leaks the fact that it uses
-no-cpp-precomp on OS X into apr-1-config.  Unfortunately, a lot of versions
of APR have this in the wild so we just have to deal with it.  If you use clang
directly you don't see this because we already filter it out of CPPFLAGS.

* Makefile.in
  (SWIG_CPPFLAGS): New variable, deliberately pulling in EXTRA_CPPFLAGS and
    not EXTRA_SIWG_CPPFLAGS because it would be harmful to split those
    (e.g. users wanting to enable a feature that adds an API).

* build.conf
  (swig-python-opts, swig-perl-opts, swig-ruby-opts): Use SWIG_CPPFLAGS
    instead of CPPFLAGS.

* configure.acc
  (SWIG_CPPFLAGS): Add the variable and copy it from the normal CPPFLAGS
    while filtering out the -no-cpp-precomp.

Modified:
    subversion/trunk/Makefile.in
    subversion/trunk/build.conf
    subversion/trunk/configure.ac

Modified: subversion/trunk/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/trunk/Makefile.in?rev=1535610&r1=1535609&r2=1535610&view=diff
==============================================================================
--- subversion/trunk/Makefile.in (original)
+++ subversion/trunk/Makefile.in Fri Oct 25 02:22:50 2013
@@ -181,6 +181,7 @@ CXXMAINTAINERFLAGS = @CXXMAINTAINERFLAGS
 CPPFLAGS = @CPPFLAGS@ $(EXTRA_CPPFLAGS)
 LDFLAGS = @LDFLAGS@ $(EXTRA_LDFLAGS)
 SWIG_LDFLAGS = @SWIG_LDFLAGS@ $(EXTRA_SWIG_LDFLAGS)
+SWIG_CPPFLAGS = @SWIG_CPPFLAGS@ $(EXTRA_CPPFLAGS)
 
 COMPILE = $(CC) $(CMODEFLAGS) $(CPPFLAGS) $(CMAINTAINERFLAGS) $(CFLAGS) $(INCLUDES)
 COMPILE_NOWARN = $(CC) $(CMODEFLAGS) $(CPPFLAGS) $(CNOWARNFLAGS) $(CFLAGS) $(INCLUDES)

Modified: subversion/trunk/build.conf
URL: http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1535610&r1=1535609&r2=1535610&view=diff
==============================================================================
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Fri Oct 25 02:22:50 2013
@@ -88,9 +88,9 @@ test-scripts =
 
 bdb-test-scripts =
 
-swig-python-opts = $(CPPFLAGS) -python -classic
-swig-perl-opts = $(CPPFLAGS) -perl -nopm -noproxy
-swig-ruby-opts = $(CPPFLAGS) -ruby
+swig-python-opts = $(SWIG_CPPFLAGS) -python -classic
+swig-perl-opts = $(SWIG_CPPFLAGS) -perl -nopm -noproxy
+swig-ruby-opts = $(SWIG_CPPFLAGS) -ruby
 swig-languages = python perl ruby
 swig-dirs = 
         subversion/bindings/swig/python

Modified: subversion/trunk/configure.ac
URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1535610&r1=1535609&r2=1535610&view=diff
==============================================================================
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Fri Oct 25 02:22:50 2013
@@ -1490,6 +1490,11 @@ if test "$CC" = "clang"; then
   SVN_STRIP_FLAG(CPPFLAGS, [-no-cpp-precomp ])
 fi
 
+# Need to strip '-no-cpp-precomp' from CPPFLAGS for SWIG as well.
+SWIG_CPPFLAGS="$CPPFLAGS"
+SVN_STRIP_FLAG(SWIG_CPPFLAGS, [-no-cpp-precomp ])
+AC_SUBST([SWIG_CPPFLAGS])
+
 dnl Since this is used only on Unix-y systems, define the path separator as '/'
 AC_DEFINE_UNQUOTED(SVN_PATH_LOCAL_SEPARATOR, '/',
         [Defined to be the path separator used on your local filesystem])