[Xfce4-commits] [panel-plugins/xfce4-hardware-monitor-plugin] 09/96: Setup configure.ac to compile C code as well so that the plugin registration code is included
noreply at xfce.org
noreply at xfce.org
Thu Nov 27 22:20:14 CET 2014
This is an automated email from the git hooks/post-receive script.
nick pushed a commit to branch master
in repository panel-plugins/xfce4-hardware-monitor-plugin.
commit 547af78368d0f54a09797be04a35c2a6873f8a4f
Author: Omega Weapon <OmegaPhil at gmail.com>
Date: Tue Oct 22 19:41:05 2013 +0100
Setup configure.ac to compile C code as well so that the plugin registration code is included
---
configure.ac | 3 ++-
src/Makefile.in | 69 +++++++++++++++++++++++++++++++++++--------------
src/register_plugin.c | 3 ++-
3 files changed, 54 insertions(+), 21 deletions(-)
diff --git a/configure.ac b/configure.ac
index 86baa43..59c518f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,8 @@ AC_ISC_POSIX
AC_MINIX
dnl Check for basic programs - AM_PROG_AR gets around non-POSIX archiver
-dnl warning
+dnl warning, AC_PROG_CC is needed as there is one pure C file to compile
+AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
IT_PROG_INTLTOOL([0.40.0])
diff --git a/src/Makefile.in b/src/Makefile.in
index 14e92bd..669233a 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -145,6 +145,7 @@ am_libhardware_monitor_la_OBJECTS = libhardware_monitor_la-applet.lo \
libhardware_monitor_la-helpers.lo \
libhardware_monitor_la-monitor-impls.lo \
libhardware_monitor_la-preferences-window.lo \
+ libhardware_monitor_la-register_plugin.lo \
libhardware_monitor_la-text-view.lo \
libhardware_monitor_la-view.lo \
libhardware_monitor_la-value-history.lo
@@ -173,24 +174,6 @@ DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CXXFLAGS) $(CXXFLAGS)
-AM_V_CXX = $(am__v_CXX_ at AM_V@)
-am__v_CXX_ = $(am__v_CXX_ at AM_DEFAULT_V@)
-am__v_CXX_0 = @echo " CXX " $@;
-am__v_CXX_1 =
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CXXLD = $(am__v_CXXLD_ at AM_V@)
-am__v_CXXLD_ = $(am__v_CXXLD_ at AM_DEFAULT_V@)
-am__v_CXXLD_0 = @echo " CXXLD " $@;
-am__v_CXXLD_1 =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -209,6 +192,24 @@ AM_V_CCLD = $(am__v_CCLD_ at AM_V@)
am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_ at AM_V@)
+am__v_CXX_ = $(am__v_CXX_ at AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_ at AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_ at AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
SOURCES = $(libhardware_monitor_la_SOURCES)
DIST_SOURCES = $(libhardware_monitor_la_SOURCES)
am__can_run_installinfo = \
@@ -423,6 +424,7 @@ libhardware_monitor_la_SOURCES = \
monitor-impls.cpp monitor-impls.hpp \
preferences-window.cpp preferences-window.hpp \
pixbuf-drawing.hpp \
+ register_plugin.c \
text-view.cpp text-view.hpp \
view.cpp view.hpp \
value-history.cpp value-history.hpp \
@@ -458,7 +460,7 @@ EXTRA_DIST = $(glade_DATA)
all: all-am
.SUFFIXES:
-.SUFFIXES: .cpp .lo .o .obj
+.SUFFIXES: .c .cpp .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -544,10 +546,39 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhardware_monitor_la-helpers.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhardware_monitor_la-monitor-impls.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhardware_monitor_la-preferences-window.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhardware_monitor_la-register_plugin.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhardware_monitor_la-text-view.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhardware_monitor_la-value-history.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libhardware_monitor_la-view.Plo at am__quote@
+.c.o:
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libhardware_monitor_la-register_plugin.lo: register_plugin.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhardware_monitor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libhardware_monitor_la-register_plugin.lo -MD -MP -MF $(DEPDIR)/libhardware_monitor_la-register_plugin.Tpo -c -o libhardware_monitor_la-register_plugin.lo `test -f 'register_plugin.c' || echo '$(srcdir)/'`register_plugin.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhardware_monitor_la-register_plugin.Tpo $(DEPDIR)/libhardware_monitor_la-register_plugin.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='register_plugin.c' object='libhardware_monitor_la-register_plugin.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhardware_monitor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libhardware_monitor_la-register_plugin.lo `test -f 'register_plugin.c' || echo '$(srcdir)/'`register_plugin.c
+
.cpp.o:
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
diff --git a/src/register_plugin.c b/src/register_plugin.c
index f650fa7..e96fcdf 100644
--- a/src/register_plugin.c
+++ b/src/register_plugin.c
@@ -20,7 +20,8 @@
#include <libxfce4panel/xfce-panel-plugin.h>
/* It looks like plugin registration MUST happen in a pure C file - doing
- * this in a C linkage block in applet.cpp is not good enough */
+ * this in a C linkage block in applet.cpp is not good enough. Because
+ * of this, AC_PROG_CC must be present in configure.ac as well */
extern void applet_construct(XfcePanelPlugin* plugin);
/* 'Registering' the applet - in reality this substitutes into a load
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list