Problem finding Gecko library

Mario Sopena <[email protected]>
Newsgroups gmane.comp.gnome.mono.documentation
Message-ID <[email protected]>
Hi,

   I spoke with Wade Berrier (Novell) because people are having
problems when loading monodoc because Mono not finding libgtkmozembed.
Say problems, say not everybody that should is using Gecko.

We end up with a patch borrowed from monodevelop that finds the path
to libgtkmozembed and adds it to the LD_LIBRARY_PATH.

Thumbs up for commiting?

Mario

_______________________________________________
Mono-docs-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-docs-list
mono-tools.diff (text/plain, 1.6 KB)
Index: mono-tools/configure.in
===================================================================
--- mono-tools/configure.in	(revision 50843)
+++ mono-tools/configure.in	(working copy)
@@ -46,6 +46,9 @@
 AC_SUBST(GECKO_SHARP_LIBS)
 AM_CONDITIONAL(ENABLE_GECKO, test "x$enable_gecko" = "xyes")
 
+MOZILLA_HOME="`$PKG_CONFIG --variable=libdir mozilla-gtkmozembed`"
+AC_SUBST(MOZILLA_HOME)
+
 dnl Intl
 GETTEXT_PACKAGE=mono-tools
 AC_SUBST(GETTEXT_PACKAGE)
Index: mono-tools/docbrowser/monodoc.in
===================================================================
--- mono-tools/docbrowser/monodoc.in	(revision 50843)
+++ mono-tools/docbrowser/monodoc.in	(working copy)
@@ -6,6 +6,28 @@
 # %%$@%$# why oh why isn't it $sharedir/monodoc
 monodocdir=$prefix/lib/monodoc
 
+# discover mozilla home to set LD_LBIBRARY_PATH
+if test -n "$MOZILLA_FIVE_HOME"; then
+	MOZILLA_HOME=$MOZILLA_FIVE_HOME
+elif [ -f @MOZILLA_HOME@/chrome/comm.jar ]; then
+        MOZILLA_HOME=@MOZILLA_HOME@
+elif [ $(which mozilla) ] && grep MOZILLA_FIVE_HOME= "$(which mozilla)" > /dev/null ; then
+	MOZILLA_HOME=$(grep MOZILLA_FIVE_HOME= $(which mozilla) | cut -d '"' -f 2)
+elif [ $(which firefox) ] && grep MOZILLA_FIVE_HOME= "$(which firefox)" > /dev/null ; then
+	MOZILLA_HOME=$(grep MOZILLA_FIVE_HOME= $(which firefox) | cut -d '"' -f 2)
+else
+	echo "Cannot find mozilla installation directory. Please set MOZILLA_FIVE_HOME to your mozilla directory"
+	exit 1
+fi
+ 
+if [ -n $LD_LIBRARY_PATH ]; then
+	export LD_LIBRARY_PATH=$MOZILLA_HOME:$LD_LIBRARY_PATH
+else
+	export LD_LIBRARY_PATH=$MOZILLA_HOME
+fi
+
+export MOZILLA_FIVE_HOME=$MOZILLA_HOME
+
 case x$1 in
     x--assemble)
 	shift;
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.