summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2008-06-20 20:26:32 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2008-06-20 20:26:32 -0700
commitc1fbd8fb41328ded8eab0b7af9dbb3cf934ee966 (patch)
treee36fcd37e8a7347918d4bc17695eb2cea63dabfc
parentbb29523ff1a17608d58d61ad106166c264263c1e (diff)
Fix browser plugin build
Add source files to Makefile that were missed in modularization Use headers specified by mozilla-plugin.pc or firefox-plugin.pc if they exist, instead of the ancient Netscape ones we carry around
-rw-r--r--configure.ac17
-rw-r--r--plugin/Main.c8
-rw-r--r--plugin/Makefile.am19
-rw-r--r--xnest-plugin/Makefile.am24
4 files changed, 62 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 9a0f01d..dcebf9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,6 +49,23 @@ PKG_CHECK_MODULES(XRX, x11 xt xext xtrans xproxymngproto xau)
AC_SUBST(XRX_CFLAGS)
AC_SUBST(XRX_LIBS)
+# Check for mozilla/firefox plugin headers via pkg-config.
+# If not found, fall back to the ancient copy we carry around.
+if test "x$PLUGIN_CFLAGS" = x ; then
+ PKG_CHECK_MODULES([MOZILLA_PLUGIN], [mozilla-plugin],
+ [PLUGIN_CFLAGS=${MOZILLA_PLUGIN_CFLAGS}], [AC_MSG_RESULT([no])])
+
+ if test "x$PLUGIN_CFLAGS" = x ; then
+ PKG_CHECK_MODULES([FIREFOX_PLUGIN], [firefox-plugin],
+ [PLUGIN_CFLAGS=${FIREFOX_PLUGIN_CFLAGS}], [AC_MSG_RESULT([no])])
+
+ if test "x$PLUGIN_CFLAGS" = x ; then
+ PLUGIN_CFLAGS=-I$(top_srcdir)/plugin/include
+ fi
+ fi
+fi
+AC_SUBST(PLUGIN_CFLAGS)
+
XAW_CHECK_XPRINT_SUPPORT(XRX_PLUGIN)
AC_SUBST(XRX_PLUGIN_CFLAGS)
AC_SUBST(XRX_PLUGIN_LIBS)
diff --git a/plugin/Main.c b/plugin/Main.c
index 834300e..1810b43 100644
--- a/plugin/Main.c
+++ b/plugin/Main.c
@@ -137,7 +137,13 @@ NPP_GetMIMEDescription(void)
}
NPError
-NPP_GetValue(void *future, NPPVariable variable, void *value)
+NPP_GetValue(
+#if NP_VERSION_MINOR < 12
+ void *future,
+#else
+ NPP instance,
+#endif
+ NPPVariable variable, void *value)
{
NPError err = NPERR_NO_ERROR;
diff --git a/plugin/Makefile.am b/plugin/Makefile.am
index 509cc9b..eccd255 100644
--- a/plugin/Makefile.am
+++ b/plugin/Makefile.am
@@ -22,13 +22,28 @@ SUBDIRS = common include
lib_LTLIBRARIES = libxrx.la
-INCLUDES = -I$(top_srcdir)/plugin/include -I$(top_srcdir)/rx
+RXSRC = $(top_srcdir)/rx
-AM_CFLAGS = -DXP_UNIX @XRX_CFLAGS@ @XRX_PLUGIN_CFLAGS@
+INCLUDES = -I$(RXSRC)
+
+# -DPLUGIN_TRACE can be added to the following definition to debug
+PLUGIN_DEFINES = -DXP_UNIX -DMOZ_X11 -DOJI
+
+DEFINES = -DNETSCAPE_PLUGIN $(PLUGIN_DEFINES)
+
+AM_CPPFLAGS = $(DEFINES)
+AM_CFLAGS = -DXP_UNIX @XRX_CFLAGS@ @XRX_PLUGIN_CFLAGS@ @PLUGIN_CFLAGS@
libxrx_la_LIBADD = @XRX_LIBS@ @XRX_PLUGIN_LIBS@
+libxrx_la_LDFLAGS = -avoid-version
+
+PARAMS_SRCS = $(RXSRC)/PRead.c $(RXSRC)/PParse.c $(RXSRC)/BuildReq.c
+XMISC_SRCS = $(RXSRC)/XUrls.c $(RXSRC)/XAuth.c $(RXSRC)/XDpyName.c \
+ $(RXSRC)/Prefs.c
libxrx_la_SOURCES = \
+ $(PARAMS_SRCS) \
+ $(XMISC_SRCS) \
Global.c \
Main.c \
NewNDest.c \
diff --git a/xnest-plugin/Makefile.am b/xnest-plugin/Makefile.am
index cafeab7..82becd2 100644
--- a/xnest-plugin/Makefile.am
+++ b/xnest-plugin/Makefile.am
@@ -20,15 +20,33 @@
lib_LTLIBRARIES = libxrxnest.la
-INCLUDES = -I$(top_srcdir)/plugin/include -I$(top_srcdir)/rx -DXP_UNIX
+RXSRC = $(top_srcdir)/rx
+PLUGINSRC = $(top_srcdir)/plugin
+
+INCLUDES = -I$(RXSRC)
+
+# -DPLUGIN_TRACE can be added to the following definition to debug
+PLUGIN_DEFINES = -DXP_UNIX -DMOZ_X11 -DOJI
+
+DEFINES = -DNETSCAPE_PLUGIN $(PLUGIN_DEFINES)
+
+AM_CPPFLAGS = $(DEFINES)
+
+PARAMS_SRCS = $(RXSRC)/PRead.c $(RXSRC)/PParse.c $(RXSRC)/BuildReq.c
+XMISC_SRCS = $(RXSRC)/XUrls.c
+PLUGIN_SRCS = $(PLUGINSRC)/Main.c $(PLUGINSRC)/stubs.c
libxrxnest_la_SOURCES = \
NewNDest.c \
PProcess.c \
RxPlugin.h \
SetWin.c \
- XnestDis.c
+ XnestDis.c \
+ $(PARAMS_SRCS) \
+ $(XMISC_SRCS) \
+ $(PLUGIN_SRCS)
-AM_CFLAGS = @XRX_CFLAGS@ @XRX_PLUGIN_CFLAGS@
+AM_CFLAGS = @XRX_CFLAGS@ @XRX_PLUGIN_CFLAGS@ @PLUGIN_CFLAGS@
libxrxnest_la_LIBADD = @XRX_LIBS@ @XRX_PLUGIN_LIBS@
+libxrxnest_la_LDFLAGS = -avoid-version