summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2013-02-07 11:12:36 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2013-03-01 17:27:18 +0100
commit38b660a33f14120c2bc5714c8ed929ddc069e1e0 (patch)
tree95d4b21b7a834d535fc2620288e30cc378a9950b
parentc6cfc833fda7734d79afe103067f98f3c5d313ac (diff)
Move some preprocessor #define to configure.ac
They were hardcoded in CPPFLAGS in Makefile.am, having them in configure.ac makes things more obvious and more flexible.
-rw-r--r--SpiceXPI/src/plugin/Makefile.am1
-rw-r--r--SpiceXPI/src/plugin/controller.cpp2
-rw-r--r--SpiceXPI/src/plugin/np_entry.cpp2
-rw-r--r--SpiceXPI/src/plugin/npn_gate.cpp2
-rw-r--r--SpiceXPI/src/plugin/npp_gate.cpp1
-rw-r--r--SpiceXPI/src/plugin/nsScriptablePeer.cpp2
-rw-r--r--SpiceXPI/src/plugin/nsScriptablePeerBase.cpp2
-rw-r--r--SpiceXPI/src/plugin/plugin.cpp3
-rw-r--r--configure.ac2
9 files changed, 15 insertions, 2 deletions
diff --git a/SpiceXPI/src/plugin/Makefile.am b/SpiceXPI/src/plugin/Makefile.am
index 3e1388d..ad4ba7f 100644
--- a/SpiceXPI/src/plugin/Makefile.am
+++ b/SpiceXPI/src/plugin/Makefile.am
@@ -15,7 +15,6 @@ libnsISpicec_la_CPPFLAGS = \
$(SPICE_PROTOCOL_CFLAGS) \
$(XUL_CFLAGS) \
-DG_LOG_DOMAIN=\"SpiceXPI\" \
- -DXP_UNIX \
$(NULL)
libnsISpicec_la_LIBADD = \
diff --git a/SpiceXPI/src/plugin/controller.cpp b/SpiceXPI/src/plugin/controller.cpp
index b912c27..99e58b3 100644
--- a/SpiceXPI/src/plugin/controller.cpp
+++ b/SpiceXPI/src/plugin/controller.cpp
@@ -40,6 +40,8 @@
*
* ***** END LICENSE BLOCK ***** */
+#include "config.h"
+
#include <cstdio>
#include <cstdlib>
#include <cstring>
diff --git a/SpiceXPI/src/plugin/np_entry.cpp b/SpiceXPI/src/plugin/np_entry.cpp
index 44f677b..7b4d666 100644
--- a/SpiceXPI/src/plugin/np_entry.cpp
+++ b/SpiceXPI/src/plugin/np_entry.cpp
@@ -45,6 +45,8 @@
// Main plugin entry point implementation -- exports from the
// plugin library
//
+#include "config.h"
+
#include <string.h>
#include "npplat.h"
#include "pluginbase.h"
diff --git a/SpiceXPI/src/plugin/npn_gate.cpp b/SpiceXPI/src/plugin/npn_gate.cpp
index 0779670..cbfcba2 100644
--- a/SpiceXPI/src/plugin/npn_gate.cpp
+++ b/SpiceXPI/src/plugin/npn_gate.cpp
@@ -44,6 +44,8 @@
//
// Implementation of Netscape entry points (NPN_*)
//
+#include "config.h"
+
#include "npapi.h"
#include "npfunctions.h"
diff --git a/SpiceXPI/src/plugin/npp_gate.cpp b/SpiceXPI/src/plugin/npp_gate.cpp
index ea058a1..e5af28c 100644
--- a/SpiceXPI/src/plugin/npp_gate.cpp
+++ b/SpiceXPI/src/plugin/npp_gate.cpp
@@ -44,6 +44,7 @@
//
// Implementation of plugin entry points (NPP_*)
//
+#include "config.h"
#include "pluginbase.h"
// here the plugin creates a plugin instance object which
diff --git a/SpiceXPI/src/plugin/nsScriptablePeer.cpp b/SpiceXPI/src/plugin/nsScriptablePeer.cpp
index a09d356..06ee1a0 100644
--- a/SpiceXPI/src/plugin/nsScriptablePeer.cpp
+++ b/SpiceXPI/src/plugin/nsScriptablePeer.cpp
@@ -51,6 +51,8 @@
// be callable from JavaScript
//
+#include "config.h"
+
#include <string.h>
#include <sstream>
#include "plugin.h"
diff --git a/SpiceXPI/src/plugin/nsScriptablePeerBase.cpp b/SpiceXPI/src/plugin/nsScriptablePeerBase.cpp
index cb1e7bd..e120958 100644
--- a/SpiceXPI/src/plugin/nsScriptablePeerBase.cpp
+++ b/SpiceXPI/src/plugin/nsScriptablePeerBase.cpp
@@ -39,6 +39,8 @@
*
* ***** END LICENSE BLOCK ***** */
+#include "config.h"
+
#include <prtypes.h>
#include <npapi.h>
#include <npruntime.h>
diff --git a/SpiceXPI/src/plugin/plugin.cpp b/SpiceXPI/src/plugin/plugin.cpp
index c870d48..4ac556a 100644
--- a/SpiceXPI/src/plugin/plugin.cpp
+++ b/SpiceXPI/src/plugin/plugin.cpp
@@ -44,6 +44,8 @@
#define _GNU_SOURCE
#endif
+#include "config.h"
+
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
@@ -65,7 +67,6 @@ extern "C" {
#include <fstream>
#include <set>
-#include "config.h"
#include "controller.h"
#include "plugin.h"
#include "nsScriptablePeer.h"
diff --git a/configure.ac b/configure.ac
index 2015117..f02c695 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,8 @@ AC_CANONICAL_HOST
AC_PROG_LIBTOOL
AM_PROG_CC_C_O
+AC_DEFINE([XP_UNIX], 1, [Building Linux plugin])
+
dnl =========================================================================
dnl Check deps