[patch] fix for MOZILLA_CFLAGS

"James E. Flemer" <[email protected]>
Newsgroups gmane.comp.gnome.lib.librsvg.devel
Message-ID <[email protected]>
[not subscribed, please maintain cc]

The configure script for librsvg uses a hack to get the CFLAGS for 
building the Mozilla plugin.  Attached is a patch that makes configure 
more likely to actually get the correct CFLAGS, and is much cleaner. 
This has been tested with Firefox 1.0.7 (firefox-config), and I am 
pretty sure Mozilla (mozilla-config) supports the same command line.

Without this patch, librsvg fails to build a firefox plugin on FreeBSD.

-James
configure.in.diff (text/x-patch, 588 B)
--- configure.in.orig	Sun Dec 18 13:51:11 2005
+++ configure.in	Sun Dec 18 13:52:03 2005
@@ -326,8 +326,7 @@
    fi
 
    if test "x$MOZILLA_CONFIG" != "xno"; then
-      _mozilla_include_dir=`$MOZILLA_CONFIG --cflags|sed 's/-I\(.*\) .*/\1/'`
-      MOZILLA_CFLAGS="-I$_mozilla_include_dir/plugin -I$_mozilla_include_dir/java -I$_mozilla_include_dir/nspr"
+      MOZILLA_CFLAGS=`$MOZILLA_CONFIG --cflags plugin java`
    else
 	PKG_CHECK_MODULES(MOZILLA, mozilla-plugin, build_mozilla_plugin=yes, 
 			[AC_MSG_WARN([mozilla-config not found. Mozilla/Netscape plugin will not be built])])
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.