[spice-xpi 6/9] Move some preprocessor #define to configure.ac

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



They were hardcoded in CPPFLAGS in Makefile.am, having them in
configure.ac makes things more obvious and more flexible.
---
 SpiceXPI/src/plugin/Makefile.am              | 1 -
 SpiceXPI/src/plugin/controller.cpp           | 2 ++
 SpiceXPI/src/plugin/np_entry.cpp             | 2 ++
 SpiceXPI/src/plugin/npn_gate.cpp             | 2 ++
 SpiceXPI/src/plugin/npp_gate.cpp             | 1 +
 SpiceXPI/src/plugin/nsScriptablePeer.cpp     | 2 ++
 SpiceXPI/src/plugin/nsScriptablePeerBase.cpp | 2 ++
 SpiceXPI/src/plugin/plugin.cpp               | 3 ++-
 configure.ac                                 | 2 ++
 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
 
-- 
1.8.1.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]